mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibJS: Clarify mathematical types in Temporal AOs and functions
This is an editorial change in the Temporal spec.
See: e480d40
This commit is contained in:
parent
30c39e0e41
commit
09d1db5afd
3 changed files with 26 additions and 19 deletions
|
@ -618,6 +618,9 @@ String format_seconds_string_part(u8 second, u16 millisecond, u16 microsecond, u
|
|||
// 13.29 ConstrainToRange ( x, minimum, maximum ), https://tc39.es/proposal-temporal/#sec-temporal-constraintorange
|
||||
double constrain_to_range(double x, double minimum, double maximum)
|
||||
{
|
||||
// 1. Assert: x, minimum and maximum are mathematical values.
|
||||
|
||||
// 2. Return min(max(x, minimum), maximum).
|
||||
return min(max(x, minimum), maximum);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue