def _calculate_sun_vector(self):
z_axis = Vector3(<NUM_LIT:0.>, <NUM_LIT:0.>, -<NUM_LIT:1.>)<EOL>x_axis = Vector3(<NUM_LIT:1.>, <NUM_LIT:0.>, <NUM_LIT:0.>)<EOL>north_vector = Vector3(<NUM_LIT:0.>, <NUM_LIT:1.>, <NUM_LIT:0.>)<EOL>_sun_vector = north_vector.rotate_around(x_axis, self.altitude_in_radians).rotate_around(z_axis, self.azimuth_in_radians).rotate_around(z_axis, math.radians(-<NUM_LIT:1> * self.north_angle))<EOL>_sun_vector.normalize()<EOL>try:<EOL><INDENT>_sun_vector.flip()<EOL><DEDENT>except AttributeError:<EOL><INDENT>_sun_vector = Vector3(-<NUM_LIT:1> * _sun_vector.x,<EOL>-<NUM_LIT:1> * _sun_vector.y,<EOL>-<NUM_LIT:1> * _sun_vector.z)<EOL><DEDENT>self._sun_vector = _sun_vector<EOL>
Calculate sun vector for this sun.