merge ws/perf-audio (Ogg page CRC via core Crc32.msb from ws/perf-core)
This commit is contained in:
commit
6ddc5b6017
113 files changed
+4582
-2280
No files matched your search
+4
-2
@@ -462,9 +462,11 @@ do
|
||||
if x ~= x then return x end
|
||||
return mmin(mmax(x, lo), hi)
|
||||
end
|
||||
-- branch-free for the same reason (a data-dependent sign spawned side traces: WavPack's decorrelation 2x slower);
|
||||
-- x * 1e300 * 1e300 is +-inf or beyond +-1 for every non-zero x, 0 for 0; + 0 turns -0 into 0
|
||||
math.sign = math.sign or function(x)
|
||||
if x > 0 then return 1 elseif x < 0 then return -1 end
|
||||
return 0
|
||||
if x ~= x then return 0 end
|
||||
return mmin(mmax(x * 1e300 * 1e300, -1), 1) + 0
|
||||
end
|
||||
-- Luau rounds half away from zero
|
||||
math.round = math.round or function(x)
|
||||
|
||||
Reference in new issue
Block a user