Skip to content

Commit

Permalink
Editorial: ToUint8Clamp guard against infinity doubles (tc39#3085)
Browse files Browse the repository at this point in the history
  • Loading branch information
dewren99 authored and ljharb committed May 31, 2023
1 parent f6ebf5d commit 2a92ed0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -5220,6 +5220,8 @@ <h1>
</dl>
<emu-alg>
1. Let _number_ be ? ToNumber(_argument_).
1. If _number_ is *+∞*<sub>𝔽</sub>, return *255*<sub>𝔽</sub>.
1. If _number_ is *-∞*<sub>𝔽</sub>, return *+0*<sub>𝔽</sub>.
1. If _number_ is *NaN*, return *+0*<sub>𝔽</sub>.
1. If ℝ(_number_) ≤ 0, return *+0*<sub>𝔽</sub>.
1. If ℝ(_number_) ≥ 255, return *255*<sub>𝔽</sub>.
Expand Down

0 comments on commit 2a92ed0

Please sign in to comment.