mesa: fix copy&paste errors in degrees() functions
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Jul 2008 20:47:21 +0000 (14:47 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Jul 2008 22:11:38 +0000 (16:11 -0600)
src/mesa/shader/slang/library/slang_common_builtin.gc

index f741c65..b095a64 100644 (file)
@@ -203,19 +203,19 @@ float degrees(const float rad)
 
 vec2 degrees(const vec2 rad)
 {
-   const float c = 3.1415926 / 180.0;
+   const float c = 180.0 / 3.1415926;
    __asm vec4_multiply __retVal.xy, rad.xy, c.xx;
 }
 
 vec3 degrees(const vec3 rad)
 {
-   const float c = 3.1415926 / 180.0;
+   const float c = 180.0 / 3.1415926;
    __asm vec4_multiply __retVal.xyz, rad.xyz, c.xxx;
 }
 
 vec4 degrees(const vec4 rad)
 {
-   const float c = 3.1415926 / 180.0;
+   const float c = 180.0 / 3.1415926;
    __asm vec4_multiply __retVal, rad, c.xxxx;
 }