Branimir Karadžić 8 lat temu
rodzic
commit
0dd6083787

+ 3 - 3
examples/02-metaballs/metaballs.cpp

@@ -375,7 +375,7 @@ float vertLerp(float* __restrict _result, float _iso, uint32_t _idx0, float _v0,
 	const float* __restrict edge0 = s_cube[_idx0];
 	const float* __restrict edge0 = s_cube[_idx0];
 	const float* __restrict edge1 = s_cube[_idx1];
 	const float* __restrict edge1 = s_cube[_idx1];
 
 
-	if (bx::fabsolute(_iso-_v1) < 0.00001f)
+	if (bx::fabs(_iso-_v1) < 0.00001f)
 	{
 	{
 		_result[0] = edge1[0];
 		_result[0] = edge1[0];
 		_result[1] = edge1[1];
 		_result[1] = edge1[1];
@@ -383,8 +383,8 @@ float vertLerp(float* __restrict _result, float _iso, uint32_t _idx0, float _v0,
 		return 1.0f;
 		return 1.0f;
 	}
 	}
 
 
-	if (bx::fabsolute(_iso-_v0) < 0.00001f
-	||  bx::fabsolute(_v0-_v1) < 0.00001f)
+	if (bx::fabs(_iso-_v0) < 0.00001f
+	||  bx::fabs(_v0-_v1) < 0.00001f)
 	{
 	{
 		_result[0] = edge0[0];
 		_result[0] = edge0[0];
 		_result[1] = edge0[1];
 		_result[1] = edge0[1];

+ 2 - 2
examples/23-vectordisplay/vectordisplay.cpp

@@ -343,8 +343,8 @@ void VectorDisplay::endDraw()
 	Line* lines = (Line*)alloca(nlines * sizeof(Line) );
 	Line* lines = (Line*)alloca(nlines * sizeof(Line) );
 
 
 	float t = effectiveThickness();
 	float t = effectiveThickness();
-	int first_last_same = bx::fabsolute(m_pendingPoints[0].x - m_pendingPoints[m_pendingPoints.size() - 1].x) < 0.1
-	                      && bx::fabsolute(m_pendingPoints[0].y - m_pendingPoints[m_pendingPoints.size() - 1].y) < 0.1;
+	int first_last_same = bx::fabs(m_pendingPoints[0].x - m_pendingPoints[m_pendingPoints.size() - 1].x) < 0.1
+	                      && bx::fabs(m_pendingPoints[0].y - m_pendingPoints[m_pendingPoints.size() - 1].y) < 0.1;
 
 
 	// compute basics
 	// compute basics
 	for (size_t i = 1; i < m_pendingPoints.size(); i++)
 	for (size_t i = 1; i < m_pendingPoints.size(); i++)

+ 2 - 2
examples/common/bounds.cpp

@@ -543,7 +543,7 @@ bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Inters
 	bx::vec3Cross(normal, _ray.m_dir, axis);
 	bx::vec3Cross(normal, _ray.m_dir, axis);
 
 
 	const float len  = bx::vec3Norm(normal, normal);
 	const float len  = bx::vec3Norm(normal, normal);
-	const float dist = bx::fabsolute(bx::vec3Dot(rc, normal) );
+	const float dist = bx::fabs(bx::vec3Dot(rc, normal) );
 
 
 	if (dist > _cylinder.m_radius)
 	if (dist > _cylinder.m_radius)
 	{
 	{
@@ -559,7 +559,7 @@ bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Inters
 
 
 	const float rsq   = bx::fsq(_cylinder.m_radius);
 	const float rsq   = bx::fsq(_cylinder.m_radius);
 	const float ddoto = bx::vec3Dot(_ray.m_dir, vo);
 	const float ddoto = bx::vec3Dot(_ray.m_dir, vo);
-	const float ss    = t0 - bx::fabsolute(bx::fsqrt(rsq - bx::fsq(dist) ) / ddoto);
+	const float ss    = t0 - bx::fabs(bx::fsqrt(rsq - bx::fsq(dist) ) / ddoto);
 
 
 	float point[3];
 	float point[3];
 	getPointAt(point, _ray, ss);
 	getPointAt(point, _ray, ss);

+ 2 - 2
examples/common/debugdraw/debugdraw.cpp

@@ -137,8 +137,8 @@ static void squircle(float* _out, float _angle)
 {
 {
 	float sa = bx::fsin(_angle);
 	float sa = bx::fsin(_angle);
 	float ca = bx::fcos(_angle);
 	float ca = bx::fcos(_angle);
-	_out[0] = bx::fsqrt(bx::fabsolute(sa) ) * bx::fsign(sa);
-	_out[1] = bx::fsqrt(bx::fabsolute(ca) ) * bx::fsign(ca);
+	_out[0] = bx::fsqrt(bx::fabs(sa) ) * bx::fsign(sa);
+	_out[1] = bx::fsqrt(bx::fabs(ca) ) * bx::fsign(ca);
 }
 }
 
 
 uint32_t genSphere(uint8_t _subdiv0, void* _pos0 = NULL, uint16_t _posStride0 = 0, void* _normals0 = NULL, uint16_t _normalStride0 = 0)
 uint32_t genSphere(uint8_t _subdiv0, void* _pos0 = NULL, uint16_t _posStride0 = 0, void* _normals0 = NULL, uint16_t _normalStride0 = 0)

+ 2 - 2
tools/texturev/texturev.cpp

@@ -1600,8 +1600,8 @@ int _main_(int _argc, char** _argv)
 				float wh[3] = { float(view.m_info.width), float(view.m_info.height), 0.0f };
 				float wh[3] = { float(view.m_info.width), float(view.m_info.height), 0.0f };
 				float result[3];
 				float result[3];
 				bx::vec3MulMtx(result, wh, orientation);
 				bx::vec3MulMtx(result, wh, orientation);
-				result[0] = bx::fround(bx::fabsolute(result[0]) );
-				result[1] = bx::fround(bx::fabsolute(result[1]) );
+				result[0] = bx::fround(bx::fabs(result[0]) );
+				result[1] = bx::fround(bx::fabs(result[1]) );
 
 
 				scale.set(bx::fmin(float(width)  / result[0]
 				scale.set(bx::fmin(float(width)  / result[0]
 					,              float(height) / result[1])
 					,              float(height) / result[1])