W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

Re: [csswg-drafts] [css-color-5] When mixing hue, there are two ways round the hue range (#4735)

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Fri, 26 Jun 2020 01:34:27 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-649899504-1593135266-sysbot+gh@w3.org>
LGTM. For readability, I would change it to:

```js
if (0 < θ₂ - θ₁ >  && θ₂ - θ₁ < 180) {
  θ₁ += 360;
}
else if (0 < θ₁ - θ₂ && θ₁ - θ₂ < 180) {
  θ₂ += 360;
}
```

or even (since this is **pseudo**-JS):


```js
if (0 < θ₂ - θ₁ < 180) {
  θ₁ += 360;
}
else if (0 < θ₁ - θ₂ < 180) {
  θ₂ += 360;
}
```

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4735#issuecomment-649899504 using your GitHub account
Received on Friday, 26 June 2020 01:34:28 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:28 UTC