View Single Post
Old 08-14-2019, 11:35 PM   #4
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default

JSFX:

Code:
// Efficient
frac = x - (x|0);

// Might be more precise for large numbers.
frac = x >= 0 ? x - floor(x) : x - floor(x) - 1;
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote