mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibJS: Replace RoundTowardsZero with truncate
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/409ab66
This commit is contained in:
committed by
Linus Groh
parent
019211bcb4
commit
4fbec2e8b3
@@ -381,7 +381,7 @@ ThrowCompletionOr<SecondsStringPrecision> to_seconds_string_precision(VM& vm, Ob
|
||||
if (fractional_digits_value.is_nan() || fractional_digits_value.is_infinity())
|
||||
return vm.template throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, fractional_digits_value, "fractionalSecondDigits"sv);
|
||||
|
||||
// 12. Let fractionalDigitCount be RoundTowardsZero(ℝ(fractionalDigitsVal)).
|
||||
// 12. Let fractionalDigitCount be truncate(ℝ(fractionalDigitsVal)).
|
||||
auto fractional_digit_count_unchecked = trunc(fractional_digits_value.as_double());
|
||||
|
||||
// 13. If fractionalDigitCount < 0 or fractionalDigitCount > 9, throw a RangeError exception.
|
||||
|
||||
Reference in New Issue
Block a user