Math.sincos(x)?
kdex
kdex at kdex.de
Thu Jun 22 18:28:31 UTC 2017
Also the sign of the `cos` component is wrong for a bunch of inputs.
On Thursday, June 22, 2017 8:16:21 PM CEST Boris Zbarsky wrote:
> On 6/22/17 2:13 PM, Алексей wrote:
> > function sincos (a) {
> >
> > const sin = Math.sin(a)
> > const cos = (1 - sin**2)**0.5
>
> This will completely fail for a near pi/2. It will return zero instead
> of the correct small but nonzero value it should be returning.
>
> -Boris
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170622/c1fc6542/attachment.sig>
More information about the es-discuss
mailing list