mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
LibJS: Fix type confusion in msFromTime
This is an editorial change in the ECMA-262 spec.
See: 8e572b6
This commit is contained in:
parent
03e13715ac
commit
17fb40bc42
Notes:
sideshowbarker
2024-07-17 11:20:07 +09:00
Author: https://github.com/linusg
Commit: 17fb40bc42
Pull-request: https://github.com/SerenityOS/serenity/pull/13902
Reviewed-by: https://github.com/IdanHo ✅
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -251,7 +251,7 @@ u16 ms_from_time(double t)
|
|||
if (!Value(t).is_finite_number())
|
||||
return 0;
|
||||
|
||||
// 𝔽(ℝ(t) modulo msPerSecond)
|
||||
// 𝔽(ℝ(t) modulo ℝ(msPerSecond))
|
||||
return static_cast<u16>(modulo(t, Date::ms_per_second));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue