mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:47:47 +00:00
LibJS: Add Handle::operator->()
This commit is contained in:
parent
a1580a1d00
commit
fed6a76990
2 changed files with 5 additions and 2 deletions
|
@ -388,7 +388,7 @@ ThrowCompletionOr<BalancedDuration> balance_duration(GlobalObject& global_object
|
|||
days = result.days;
|
||||
|
||||
// c. Set nanoseconds to result.[[Nanoseconds]].
|
||||
total_nanoseconds = result.nanoseconds.cell()->big_integer();
|
||||
total_nanoseconds = result.nanoseconds->big_integer();
|
||||
}
|
||||
// 5. Else,
|
||||
else {
|
||||
|
@ -1238,7 +1238,7 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d
|
|||
auto result = TRY(nanoseconds_to_days(global_object, *nanoseconds_bigint, intermediate));
|
||||
|
||||
// e. Set days to days + result.[[Days]] + result.[[Nanoseconds]] / result.[[DayLength]].
|
||||
auto nanoseconds_division_result = result.nanoseconds.cell()->big_integer().divided_by(Crypto::UnsignedBigInteger::create_from((u64)result.day_length));
|
||||
auto nanoseconds_division_result = result.nanoseconds->big_integer().divided_by(Crypto::UnsignedBigInteger::create_from((u64)result.day_length));
|
||||
days += result.days + nanoseconds_division_result.quotient.to_double() + nanoseconds_division_result.remainder.to_double() / result.day_length;
|
||||
|
||||
// f. Set hours, minutes, seconds, milliseconds, microseconds, and nanoseconds to 0.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue