Skip to content

Commit

Permalink
Editorial: fix algorithm of Math.atan2
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Sep 10, 2023
1 parent b12a244 commit a99ee7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -31708,7 +31708,11 @@ <h1>Math.atan2 ( _y_, _x_ )</h1>
1. If _nx_ is *-∞*<sub>𝔽</sub>, return an implementation-approximated Number value representing -π.
1. If _nx_ is either *+0*<sub>𝔽</sub> or *-0*<sub>𝔽</sub>, return an implementation-approximated Number value representing -π / 2.
1. Assert: _nx_ is finite and is neither *+0*<sub>𝔽</sub> nor *-0*<sub>𝔽</sub>.
1. Return an implementation-approximated Number value representing the result of the inverse tangent of the quotient ℝ(_ny_) / ℝ(_nx_).
1. Let _r_ be the result of the inverse tangent of ℝ(_ny_ / _nx_).
1. If _nx_ &lt; *-0*<sub>𝔽</sub>, then
1. If _ny_ &gt; *+0*<sub>𝔽</sub>, set _r_ to π - _r_.
1. Else, set _r_ to -π - _r_.
1. Return an implementation-approximated Number value representing _r_.
</emu-alg>
</emu-clause>

Expand Down

0 comments on commit a99ee7e

Please sign in to comment.