1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

LibJS: Align MathObject::atan closer to spec

This is not an observable difference. Nonetheless, it seems like a good
idea to be as close to the spec as possible, so let's do that.
This commit is contained in:
Shannon Booth 2023-05-27 14:25:43 +12:00 committed by Andreas Kling
parent 979973ca0e
commit 06593a81da

View file

@ -303,7 +303,7 @@ JS_DEFINE_NATIVE_FUNCTION(MathObject::atan2)
}
// 10. If ny < -0𝔽, then
if (y.as_double() < 0) {
if (y.as_double() < -0) {
// a. If nx is +∞𝔽, return -0𝔽.
if (x.is_positive_infinity())
return Value(-0.0);