Index: trunk/src/core/random.cc
===================================================================
--- trunk/src/core/random.cc	(revision 443)
+++ trunk/src/core/random.cc	(revision 451)
@@ -110,16 +110,16 @@
 nv::vec2 nv::random::precise_unit_vec2()
 {
-	float angle = frand( glm::pi<float>() * 2.f );
-	return vec2( glm::cos( angle ), glm::sin( angle ) );
+	f32 angle = frand( math::pi<f32>() * 2.f );
+	return vec2( math::cos( angle ), math::sin( angle ) );
 }
 
 nv::vec3 nv::random::precise_unit_vec3()
 {
-	float cos_theta = frange( -1.0f, 1.0f );
-	float sin_theta = glm::sqrt( 1.0f - cos_theta * cos_theta );
-	float phi       = frand( 2 * glm::pi<float>() );
+	f32 cos_theta = frange( -1.0f, 1.0f );
+	f32 sin_theta = math::sqrt( 1.0f - cos_theta * cos_theta );
+	f32 phi       = frand( 2 * math::pi<f32>() );
 	return vec3( 
-		sin_theta * glm::sin(phi),
-		sin_theta * glm::cos(phi),
+		sin_theta * math::sin(phi),
+		sin_theta * math::cos(phi),
 		cos_theta
 		);
@@ -128,29 +128,29 @@
 nv::vec2 nv::random::fast_disk_point()
 {
-	float r1 = frand();
-	float r2 = frand();
+	f32 r1 = frand();
+	f32 r2 = frand();
 	if ( r1 > r2 ) swap( r1, r2 );
-	float rf = 2*glm::pi<float>()*(r1/r2);
-	return vec2( r2*glm::cos( rf ), r2*glm::sin( rf ) );
+	f32 rf = 2* math::pi<f32>()*(r1/r2);
+	return vec2( r2*math::cos( rf ), r2*math::sin( rf ) );
 }
 
 nv::vec2 nv::random::precise_disk_point()
 {
-	float r = glm::sqrt( frand() );
-	float rangle = frand( glm::pi<float>() );
-	return vec2( r*glm::cos( rangle ), r*glm::sin( rangle ) );
+	f32 r = math::sqrt( frand() );
+	f32 rangle = frand( math::pi<f32>() );
+	return vec2( r*math::cos( rangle ), r*math::sin( rangle ) );
 }
 
 nv::vec3 nv::random::fast_sphere_point()
 {
-	float rad     = frand();
-	float pi      = glm::pi<float>();
-	float phi     = glm::asin( frange( -1.0f, 1.0f ) ) + pi*.5f;
-	float theta   = frange( 0.0f, 2 * glm::pi<float>() );
-	float sin_phi = glm::sin( phi );
+	f32 rad     = frand();
+	f32 pi      = math::pi<f32>();
+	f32 phi     = math::asin( frange( -1.0f, 1.0f ) ) + pi*.5f;
+	f32 theta   = frange( 0.0f, 2 * math::pi<f32>() );
+	f32 sin_phi = math::sin( phi );
 	return vec3( 
-		rad * glm::cos(theta) * sin_phi,
-		rad * glm::sin(theta) * sin_phi,
-		rad * glm::cos(phi)
+		rad * math::cos(theta) * sin_phi,
+		rad * math::sin(theta) * sin_phi,
+		rad * math::cos(phi)
 	);
 }
@@ -158,11 +158,11 @@
 nv::vec3 nv::random::precise_sphere_point()
 {
-	float radius = glm::pow( frand(), 1.f/3.f );
-	float cos_theta = frange( -1.0f, 1.0f );
-	float sin_theta = glm::sqrt( 1.0f - cos_theta * cos_theta );
-	float phi       = frange( 0.0f, 2 * glm::pi<float>() );
+	f32 radius = math::pow( frand(), 1.f/3.f );
+	f32 cos_theta = frange( -1.0f, 1.0f );
+	f32 sin_theta = math::sqrt( 1.0f - cos_theta * cos_theta );
+	f32 phi       = frange( 0.0f, 2 * math::pi<f32>() );
 	return vec3( 
-		radius * sin_theta * glm::sin(phi),
-		radius * sin_theta * glm::cos(phi),
+		radius * sin_theta * math::sin(phi),
+		radius * sin_theta * math::cos(phi),
 		radius * cos_theta
 		);
@@ -199,26 +199,26 @@
 }
 
-nv::vec2 nv::random::fast_hollow_disk_point( float iradius, float oradius )
-{
-	float idist2 = iradius * iradius;
-	float odist2 = oradius * oradius;
-	float rdist  = glm::sqrt( frange( idist2, odist2 ) );
+nv::vec2 nv::random::fast_hollow_disk_point( f32 iradius, f32 oradius )
+{
+	f32 idist2 = iradius * iradius;
+	f32 odist2 = oradius * oradius;
+	f32 rdist  = math::sqrt( frange( idist2, odist2 ) );
 	return rdist * precise_unit_vec2();
 }
 
-nv::vec2 nv::random::precise_hollow_disk_point( float iradius, float oradius )
+nv::vec2 nv::random::precise_hollow_disk_point( f32 iradius, f32 oradius )
 {
 	return fast_hollow_disk_point( iradius, oradius );
 }
 
-nv::vec3 nv::random::fast_hollow_sphere_point( float iradius, float oradius )
-{
-	float idist3 = iradius * iradius * iradius;
-	float odist3 = oradius * oradius * oradius;
-	float rdist  = glm::pow( frange( idist3, odist3 ), 1.f/3.f );
+nv::vec3 nv::random::fast_hollow_sphere_point( f32 iradius, f32 oradius )
+{
+	f32 idist3 = iradius * iradius * iradius;
+	f32 odist3 = oradius * oradius * oradius;
+	f32 rdist  = math::pow( frange( idist3, odist3 ), 1.f/3.f );
 	return rdist * precise_unit_vec3();
 }
 
-nv::vec3 nv::random::precise_hollow_sphere_point( float iradius, float oradius )
+nv::vec3 nv::random::precise_hollow_sphere_point( f32 iradius, f32 oradius )
 {
 	return fast_hollow_sphere_point( iradius, oradius );
@@ -232,10 +232,10 @@
 	vec2 opoint2    = opoint * opoint;
 	vec2 odir       = glm::normalize( opoint );
-	float odist2    = opoint2.x + opoint2.y;
-
-	float low    = iradii2.y * opoint2.x + iradii2.x * opoint2.y;
-	float idist2 = ((iradii2.x * iradii2.y) / low ) * odist2;
-
-	float rdist     = glm::sqrt( frange( idist2, odist2 ) );
+	f32 odist2    = opoint2.x + opoint2.y;
+
+	f32 low    = iradii2.y * opoint2.x + iradii2.x * opoint2.y;
+	f32 idist2 = ((iradii2.x * iradii2.y) / low ) * odist2;
+
+	f32 rdist     = math::sqrt( frange( idist2, odist2 ) );
 	return odir * rdist;	
 }
@@ -252,16 +252,16 @@
 	vec3 opoint2    = opoint * opoint;
 	vec3 odir       = glm::normalize( opoint );
-	float odist2    = opoint2.x + opoint2.y + opoint2.z;
-
-	float low    = 
+	f32 odist2    = opoint2.x + opoint2.y + opoint2.z;
+
+	f32 low    = 
 		iradii2.y * iradii2.z * opoint2.x + 
 		iradii2.x * iradii2.z * opoint2.y +
 		iradii2.x * iradii2.y * opoint2.z;
-	float idist2 = ((iradii2.x * iradii2.y * iradii2.z) / low ) * odist2;
-
-	float odist3 = odist2 * glm::sqrt( odist2 );
-	float idist3 = idist2 * glm::sqrt( idist2 );
-
-	float rdist     = glm::pow( frange( idist3, odist3 ), 1.f/3.f );
+	f32 idist2 = ((iradii2.x * iradii2.y * iradii2.z) / low ) * odist2;
+
+	f32 odist3 = odist2 * math::sqrt( odist2 );
+	f32 idist3 = idist2 * math::sqrt( idist2 );
+
+	f32 rdist     = math::pow( frange( idist3, odist3 ), 1.f/3.f );
 	return odir * rdist;	
 }
