]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/md3model/md3normals.h
reformat code! now the code is only ugly on the *inside*
[xonotic/netradiant.git] / plugins / md3model / md3normals.h
index 3803c370efeac24aef03c742fed3347cccf0c554..77529c87202e04fe7ab95e2b81537b6f860bdadd 100644 (file)
 typedef unsigned char byte;
 
 // latitude-longditude to normal conversion
-inline Normal3f DecodeNormal( const byte bytes[2] ){
-       double lat = bytes[0] * ( c_pi / 128.0 );
-       double lng = bytes[1] * ( c_pi / 128.0 );
-
-       return Normal3f(
-                          static_cast<float>( cos( lat ) * sin( lng ) ),
-                          static_cast<float>( sin( lat ) * sin( lng ) ),
-                          static_cast<float>( cos( lng ) )
-                          );
+inline Normal3f DecodeNormal(const byte bytes[2])
+{
+    double lat = bytes[0] * (c_pi / 128.0);
+    double lng = bytes[1] * (c_pi / 128.0);
+
+    return Normal3f(
+            static_cast<float>( cos(lat) * sin(lng)),
+            static_cast<float>( sin(lat) * sin(lng)),
+            static_cast<float>( cos(lng))
+    );
 }
 
 #endif