Branimir Karadžić 8 years ago
parent
commit
98857222c2
2 changed files with 6 additions and 6 deletions
  1. 1 1
      examples/common/bounds.cpp
  2. 5 5
      examples/common/camera.cpp

+ 1 - 1
examples/common/bounds.cpp

@@ -282,7 +282,7 @@ void calcMaxBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _num
 	}
 
 	bx::vec3Move(_sphere.m_center, center);
-	_sphere.m_radius = sqrtf(maxDistSq);
+	_sphere.m_radius = bx::fsqrt(maxDistSq);
 }
 
 void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _numVertices, uint32_t _stride, float _step)

+ 5 - 5
examples/common/camera.cpp

@@ -166,16 +166,16 @@ struct Camera
 
 		float direction[3] =
 		{
-			cosf(m_verticalAngle) * sinf(m_horizontalAngle),
-			sinf(m_verticalAngle),
-			cosf(m_verticalAngle) * cosf(m_horizontalAngle),
+			bx::fcos(m_verticalAngle) * bx::fsin(m_horizontalAngle),
+			bx::fsin(m_verticalAngle),
+			bx::fcos(m_verticalAngle) * bx::fcos(m_horizontalAngle),
 		};
 
 		float right[3] =
 		{
-			sinf(m_horizontalAngle - bx::piHalf),
+			bx::fsin(m_horizontalAngle - bx::piHalf),
 			0,
-			cosf(m_horizontalAngle - bx::piHalf),
+			bx::fcos(m_horizontalAngle - bx::piHalf),
 		};
 
 		float up[3];