diff --git a/math.d b/math.d index bcdc398..740a3e5 100644 --- a/math.d +++ b/math.d @@ -3,7 +3,7 @@ import includes; import util; import std.math; import std.math.algebraic; -import core.stdc.math : tanf, cosf, sinf, sqrtf; +import core.stdc.math : tanf, cosf, sinf, sqrtf, fabsf; import std.traits; import std.meta; import std.format; @@ -110,7 +110,7 @@ struct Vector(T, int N) foreach(i; 0 .. N) { - if (fabs(v[i] - other.v[i]) > 0.0000009) + if (fabsf(v[i] - other.v[i]) > 0.0000009) { result = false; break; @@ -455,7 +455,7 @@ align(16) struct Matrix(T, int D) static foreach(i; 0 .. N) { - if (fabs(this.v[i] - other.v[i]) > 0.0000009) + if (fabsf(this.v[i] - other.v[i]) > 0.0000009) { result = false; }