mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41:55 +00:00
btest and minmax alias
This commit is contained in:
@@ -30,19 +30,22 @@ export type Math = {
|
||||
IsEven: (n: number) -> boolean,
|
||||
RotationMatrix: (X: number, Y: number, Z: number) -> RotationMatrix,
|
||||
Scalar: (X1: number, Y1: number, X2: number, Y2: number) -> Scalar,
|
||||
maxmin: (min: number, n: number, max: number) -> number
|
||||
maxmin: (min: number, n: number, max: number) -> number,
|
||||
minmax: (min: number, n: number, max: number) -> number
|
||||
}
|
||||
|
||||
local Math = {} :: Math
|
||||
|
||||
function Math.IsEven(n)
|
||||
return bit32.band(n, 1) == 0
|
||||
return bit32.btest(bit32.band(n, 1))
|
||||
end
|
||||
|
||||
function Math.maxmin(min, n, max)
|
||||
return math.max(min, math.min(n, max))
|
||||
end
|
||||
|
||||
Math.minmax = Math.maxmin
|
||||
|
||||
function Math.RotationMatrix(X: number, Y: number, Z: number): RotationMatrix
|
||||
local cosX, sinX = math.cos(X), math.sin(X)
|
||||
local cosY, sinY = math.cos(Y), math.sin(Y)
|
||||
|
||||
Reference in New Issue
Block a user