fix fabs
This commit is contained in:
parent
3c6d214aa7
commit
649b3409d9
6
math.d
6
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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user