Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions css-color-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -752,37 +752,37 @@ Unless the type of hue interpolation is ''specified'', both angles need to be co
One way to do this is <code><i>θ</i> = ((<i>θ</i> % 360) + 360) % 360</code>.

: ''shorter''
:: Angles are adjusted so that θ₂ - θ₁ ∈ [0, 180). In pseudo-Javascript:
:: Angles are adjusted so that θ₂ - θ₁ ∈ [-180, 180]. In pseudo-Javascript:
<pre>
if (θ₂ - θ₁ >= 180) {
if (θ₂ - θ₁ > 180) {
θ₁ += 360;
}
else if (θ₂ - θ₁ <= -180) {
else if (θ₂ - θ₁ < -180) {
θ₂ += 360;
}
</pre>

: ''longer''
:: Angles are adjusted so that θ₂ - θ₁ ∈ [180, 360). In pseudo-Javascript:
:: Angles are adjusted so that |θ₂ - θ₁|{0, [180, 360)}. In pseudo-Javascript:
<pre>
if (0 < θ₂ - θ₁ < 180) {
θ₁ += 360;
θ₁ += 360;
}
else if (-180 < θ₂ - θ₁ < 0) {
θ₂ += 360;
θ₂ += 360;
}
</pre>

: ''increasing''
:: Angles are adjusted so that θ₂ - θ₁ ∈ [0, 360) and θ₁ ≤ θ₂. In pseudo-Javascript:
:: Angles are adjusted so that θ₂ - θ₁ ∈ [0, 360). In pseudo-Javascript:
<pre>
if (θ₂ < θ₁) {
θ₂ += 360;
}
</pre>

: ''decreasing''
:: Angles are adjusted so that θ₂ - θ₁ ∈ [0, 360) and θ₁ ≥ θ₂. In pseudo-Javascript:
:: Angles are adjusted so that θ₂ - θ₁ ∈ (-360, 0]. In pseudo-Javascript:
<pre>
if (θ₁ < θ₂) {
θ₁ += 360;
Expand Down