fix float.eq()

pull/2349/head
Alexander Medvednikov 2019-10-15 03:45:11 +03:00
parent 91690a1b54
commit 10ed65bc12
1 changed files with 2 additions and 2 deletions

View File

@ -43,10 +43,10 @@ pub fn (a f32) eq(b f32) bool {
$if tinyc {
return a -b <= 0.01
} $else {
return C.fabs(a - b) <= C.DBL_EPSILON
return C.fabsf(a - b) <= C.FLT_EPSILON
}
} $else {
return C.fabs(a - b) <= C.DBL_EPSILON
return C.fabsf(a - b) <= C.FLT_EPSILON
}
}
pub fn (a f64) eqbit(b f64) bool {