mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 23:01:53 +00:00
Maxmin and IsEven, work on getting doors functional again
This commit is contained in:
@@ -27,6 +27,7 @@ export type Math = {
|
||||
InOutBack: EaseFunction,
|
||||
OutBounce: EaseFunction,
|
||||
InQuad: EaseFunction,
|
||||
IsOdd: (n: number) -> boolean,
|
||||
IsEven: (n: number) -> boolean,
|
||||
RotationMatrix: (X: number, Y: number, Z: number) -> RotationMatrix,
|
||||
Scalar: (X1: number, Y1: number, X2: number, Y2: number) -> Scalar,
|
||||
@@ -36,10 +37,14 @@ export type Math = {
|
||||
|
||||
local Math = {} :: Math
|
||||
|
||||
function Math.IsEven(n)
|
||||
function Math.IsOdd(n)
|
||||
return bit32.btest(bit32.band(n, 1))
|
||||
end
|
||||
|
||||
function Math.IsEven(n)
|
||||
return not Math.IsOdd(n)
|
||||
end
|
||||
|
||||
function Math.maxmin(min, n, max)
|
||||
return math.max(min, math.min(n, max))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user