mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 21:45:20 +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
Notes:
sideshowbarker
2024-07-18 12:37:34 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/ac9dbcda977 Pull-request: https://github.com/SerenityOS/serenity/pull/7874 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/gmta
1 changed files with 15 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue