mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-06 16:09:30 +00:00
LibM: Implement nearbyint, nearbyintl and nearbyintf
These are used by the ultima engine for scummvm.
This commit is contained in:
parent
d2662df57c
commit
ac9dbcda97
|
@ -1413,4 +1413,19 @@ float fminf(float x, float y) NOEXCEPT
|
|||
|
||||
return x < y ? x : y;
|
||||
}
|
||||
|
||||
long double nearbyintl(long double value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode { fegetround() });
|
||||
}
|
||||
|
||||
double nearbyint(double value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode { fegetround() });
|
||||
}
|
||||
|
||||
float nearbyintf(float value) NOEXCEPT
|
||||
{
|
||||
return internal_to_integer(value, RoundingMode { fegetround() });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue