[csswg-drafts] [css-values-4] Normalization of arc trigonometric function values (#9625)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values-4] Normalization of arc trigonometric function values ==
The [spec](https://drafts.csswg.org/css-values-4/#funcdef-asin) wants the angle returned by `acos()`, `asin()`, `atan()`, `atan2()`, to be normalized to the appropriate range.

  > The angle returned by `asin()` must be normalized to the range `[-90deg, 90deg]`; the angle returned by `acos()` to the range `[0deg, 180deg]`; and the angle returned by `atan()` to the range `[-90deg, 90deg]`.

  > The `atan2(A, B)` function [...] returns the `<angle>` [...]. The returned angle must be normalized to the interval `(-180deg, 180deg]`

But later in [type checking](https://drafts.csswg.org/css-values-4/#css-nan), it requires to produce NaN for some arguments:

  > Certain argument combinations in math functions are defined to produce NaN (for example, `asin(2)` produces `NaN`)

Can you please tell me how do you make `asin()` (for example) return a value outside of `[-90deg,90deg]`? Argument values outside `[0,1]` return `NaN` in Chrome/FF and the [WPT tests](https://github.com/web-platform-tests/wpt/blob/16c57b53a5883393fce3f7e6843a8d51e195d7e2/css/css-values/acos-asin-atan-atan2-serialize.html).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9625 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 22 November 2023 17:07:34 UTC