public static double [ ] calcInverseSunVector ( double [ ] sunVector ) { double m = Math . max ( Math . abs ( sunVector [ 0 ] ) , Math . abs ( sunVector [ 1 ] ) ) ; return new double [ ] { - sunVector [ 0 ] / m , - sunVector [ 1 ] / m , - sunVector [ 2 ] / m } ; }
Calculating the inverse of the sun vector .