3 ms·
> I swear the only reason people pay FJCVTZS any attention at all is that it has "JavaScript" in its name. You’re not wrong, and yet— > convert float to int,
by mananaysiempre 2y ago
> I swear the only reason people pay FJCVTZS any attention at all is that it has "JavaScript" in its name.
You’re not wrong, and yet—
> convert float to int, round towards zero
... and take the result modulo 2^32 as two’s complement. That’s still rather specific and likely useless for numeric computing, which is the canonical application area for this kind of thing. So the “JavaScript” in the name is fair, if only to dispel confusion around why one would ever want this.
(The normal, saturating conversion is FCVTZS.)