This commit is contained in:
Matthew 2025-08-17 07:54:02 +10:00
parent 3c6d214aa7
commit 649b3409d9

6
math.d
View File

@ -3,7 +3,7 @@ import includes;
import util; import util;
import std.math; import std.math;
import std.math.algebraic; 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.traits;
import std.meta; import std.meta;
import std.format; import std.format;
@ -110,7 +110,7 @@ struct Vector(T, int N)
foreach(i; 0 .. 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; result = false;
break; break;
@ -455,7 +455,7 @@ align(16) struct Matrix(T, int D)
static foreach(i; 0 .. N) 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; result = false;
} }