Cleanup: use M_PI_2 and M_PI_4 where possible

The constant M_PI_4 is added to GLSL to ensure it works there too.

Differential Revision: https://developer.blender.org/D14288
This commit is contained in:
Hallam Roberts
2022-03-11 16:14:05 +01:00
committed by Brecht Van Lommel
parent 62a0984d72
commit 3da84d8b08
30 changed files with 51 additions and 50 deletions

View File

@@ -14,8 +14,8 @@
UnitConverter::UnitConverter() : up_axis(COLLADAFW::FileInfo::Z_UP)
{
axis_angle_to_mat4_single(x_up_mat4, 'Y', -0.5 * M_PI);
axis_angle_to_mat4_single(y_up_mat4, 'X', 0.5 * M_PI);
axis_angle_to_mat4_single(x_up_mat4, 'Y', -M_PI_2);
axis_angle_to_mat4_single(y_up_mat4, 'X', M_PI_2);
unit_m4(z_up_mat4);
unit_m4(scale_mat4);