public static double[] calcNormalSunVector( double[] sunVector ) {
        double[] normalSunVector = new double[3];
        normalSunVector[2] = Math.sqrt(Math.pow(sunVector[0], 2) + Math.pow(sunVector[1], 2));
        normalSunVector[0] = -sunVector[0] * sunVector[2] / normalSunVector[2];
        normalSunVector[1] = -sunVector[1] * sunVector[2] / normalSunVector[2];
        return normalSunVector;
    }
public static double [ ] calcNormalSunVector ( double [ ] sunVector ) { double [ ] normalSunVector = new double [ 3 ] ; normalSunVector [ 2 ] = Math . sqrt ( Math . pow ( sunVector [ 0 ] , 2 ) + Math . pow ( sunVector [ 1 ] , 2 ) ) ; normalSunVector [ 0 ] = - sunVector [ 0 ] * sunVector [ 2 ] / normalSunVector [ 2 ] ; normalSunVector [ 1 ] = - sunVector [ 1 ] * sunVector [ 2 ] / normalSunVector [ 2 ] ; return normalSunVector ; }
Calculating the normal to the sun vector.

@param sunVector
@return