add ability to explicitly cast float to integer

closes #414
This commit is contained in:
Andrew Kelley
2017-08-07 15:57:41 -04:00
parent 38b47d8aca
commit 2234788fa8
7 changed files with 58 additions and 12 deletions

View File

@@ -150,3 +150,7 @@ Cmp bigfloat_cmp_zero(const BigFloat *bigfloat) {
return CmpEQ;
}
}
bool bigfloat_has_fraction(const BigFloat *bigfloat) {
return floorl(bigfloat->value) != bigfloat->value;
}