1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Overloaded basic math funcs (double and float variants). Use real_t rather than float or double in generic functions (core/math) whenever possible.

Also inlined some more math functions.
This commit is contained in:
Ferenc Arn
2017-01-14 14:35:39 -06:00
parent d13f2f9e25
commit 6f4f9aa6de
50 changed files with 543 additions and 615 deletions

View File

@@ -86,7 +86,7 @@ Error QuickHull::build(const Vector<Vector3>& p_points, Geometry::MeshData &r_me
if (!valid_points[i])
continue;
float d = p_points[i][longest_axis];
real_t d = p_points[i][longest_axis];
if (i==0 || d < min) {
simplex[0]=i;
@@ -105,7 +105,7 @@ Error QuickHull::build(const Vector<Vector3>& p_points, Geometry::MeshData &r_me
{
float maxd;
real_t maxd;
Vector3 rel12 = p_points[simplex[0]] - p_points[simplex[1]];
for(int i=0;i<p_points.size();i++) {
@@ -127,7 +127,7 @@ Error QuickHull::build(const Vector<Vector3>& p_points, Geometry::MeshData &r_me
//fourth vertex is the one most further away from the plane
{
float maxd;
real_t maxd;
Plane p(p_points[simplex[0]],p_points[simplex[1]],p_points[simplex[2]]);
for(int i=0;i<p_points.size();i++) {