You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
14 lines
225 B
TypeScript
14 lines
225 B
TypeScript
const toUint32 = (x: number) => x >>> 0;
|
|
|
|
export const ToInt32 = (x: number) =>
|
|
{
|
|
const uint32 = toUint32(x);
|
|
|
|
if(uint32 >= Math.pow(2, 31))
|
|
{
|
|
return uint32 - Math.pow(2, 32);
|
|
}
|
|
|
|
return uint32;
|
|
};
|