@@ -4527,8 +4527,18 @@ Hue interpolation</h3>
45274527 Unless the type of hue interpolation is ''specified'' , both angles need to be constrained to [0, 360) prior to interpolation.
45284528 One way to do this is <code><i> θ</i> = ((<i> θ</i> % 360) + 360) % 360</code> .
45294529
4530- : ''shorter''
4531- :: Angles are adjusted so that θ₂ - θ₁ ∈ [-180, 180] . In pseudo-Javascript:
4530+ Unless otherwise specified, if no specific hue interpolation algorithm is selected by the host syntax, the default is ''shorter'' .
4531+
4532+ If one of the angles has the value NaN,
4533+ then for interpolation, NaN is replaced
4534+ by the value of the other hue angle.
4535+ If both angles have the value NaN,
4536+ then for interpolation, NaN is replaced
4537+ by the value 0 for both angles.
4538+
4539+ <h4 id="hue-shorter">''shorter''"</h4>
4540+
4541+ Angles are adjusted so that θ₂ - θ₁ ∈ [-180, 180] . In pseudo-Javascript:
45324542 <pre>
45334543 if (θ₂ - θ₁ > 180) {
45344544 θ₁ += 360;
@@ -4538,8 +4548,9 @@ Hue interpolation</h3>
45384548 }
45394549 </pre>
45404550
4541- : ''longer''
4542- :: Angles are adjusted so that |θ₂ - θ₁| ∈ {0, [180, 360)}. In pseudo-Javascript:
4551+ <h4 id="hue-longer">''longer''</h4>
4552+
4553+ Angles are adjusted so that |θ₂ - θ₁| ∈ {0, [180, 360)}. In pseudo-Javascript:
45434554 <pre>
45444555 if (0 < θ₂ - θ₁ < 180) {
45454556 θ₁ += 360;
@@ -4549,33 +4560,28 @@ Hue interpolation</h3>
45494560 }
45504561 </pre>
45514562
4552- : ''increasing''
4553- :: Angles are adjusted so that θ₂ - θ₁ ∈ [0, 360). In pseudo-Javascript:
4563+ <h4 id="hue-increasing">''increasing''</h4>
4564+
4565+ Angles are adjusted so that θ₂ - θ₁ ∈ [0, 360). In pseudo-Javascript:
45544566 <pre>
45554567 if (θ₂ < θ₁) {
45564568 θ₂ += 360;
45574569 }
45584570 </pre>
45594571
4560- : ''decreasing''
4561- :: Angles are adjusted so that θ₂ - θ₁ ∈ (-360, 0]. In pseudo-Javascript:
4572+ <h4 id="hue-decreasing">''decreasing''</h4>
4573+
4574+ Angles are adjusted so that θ₂ - θ₁ ∈ (-360, 0]. In pseudo-Javascript:
45624575 <pre>
45634576 if (θ₁ < θ₂) {
45644577 θ₁ += 360;
45654578 }
45664579 </pre>
45674580
4568- : ''specified''
4569- :: No fixup is performed. Angles are interpolated in the same way as every other component.
4581+ <h4 id="hue-specified">''specified''</h4>
45704582
4571- Unless otherwise specified, if no specific hue interpolation algorithm is selected by the host syntax, the default is ''shorter'' .
4583+ No fixup is performed. Angles are interpolated in the same way as every other component .
45724584
4573- If one of the angles has the value NaN,
4574- then for interpolation, NaN is replaced
4575- by the value of the other hue angle.
4576- If both angles have the value NaN,
4577- then for interpolation, NaN is replaced
4578- by the value 0 for both angles.
45794585
45804586 Issue(#4928):
45814587
0 commit comments