* Code cleanup for M_PI code.

This commit is contained in:
Thomas Dinges
2013-10-10 17:14:04 +00:00
parent 223c637a93
commit 3d4bbd278a
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@
vector environment_texture_direction_to_equirectangular(vector dir)
{
float u = -atan2(dir[1], dir[0]) / (2.0 * M_PI) + 0.5;
float u = -atan2(dir[1], dir[0]) / (M_2PI) + 0.5;
float v = atan2(dir[2], hypot(dir[0], dir[1])) / M_PI + 0.5;
return vector(u, v, 0.0);