mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-15 21:51:55 +00:00
Faster RotationMatrix, IsEven bit shift and, work on MakeProperty module
This commit is contained in:
@@ -144,13 +144,17 @@ local function GUI_LoadFinish(Gui: GuiDependencies) --We can now access the fram
|
||||
end
|
||||
|
||||
local function 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)
|
||||
local cosZ, sinZ = math.cos(Z), math.sin(Z)
|
||||
|
||||
return {
|
||||
Ixx = math.cos(Z)*math.cos(X)-math.sin(Z)*math.sin(X)*math.sin(Y);
|
||||
Ixy = math.cos(Z)*math.sin(X)*math.sin(Y)+math.sin(Z)*math.cos(X);
|
||||
Iyx = -math.cos(Z)*math.sin(X)-math.sin(Z)*math.cos(X)*math.sin(Y);
|
||||
Iyy = math.cos(Z)*math.cos(X)*math.sin(Y)-math.sin(Z)*math.sin(X);
|
||||
Izx = -math.sin(Z)*math.cos(Y);
|
||||
Izy = math.cos(Z)*math.sin(Y)
|
||||
Ixx = cosZ*cosX-sinZ*sinX*sinY,
|
||||
Ixy = cosZ*sinX*sinY+sinZ*cosX,
|
||||
Iyx = -cosZ*sinX-sinZ*cosX*sinY,
|
||||
Iyy = cosZ*cosX*sinY-sinZ*sinX,
|
||||
Izx = -sinZ*cosY,
|
||||
Izy = cosZ*sinY
|
||||
}
|
||||
end
|
||||
|
||||
@@ -216,7 +220,7 @@ return function(IntroGui: ScreenGui, load_elapse_start: number)
|
||||
|
||||
local load_elapse = os.clock()-load_elapse_start
|
||||
if LoadingFun then
|
||||
task.wait(math.max(0, 4-load_elapse)) --Only if you take longer than or exactly 4 seconds to load
|
||||
task.wait(math.max(0, 3-load_elapse)) --Only if you take longer than or exactly 4 seconds to load
|
||||
end
|
||||
|
||||
TS:Message("Load elapse: "..tostring(load_elapse), game)
|
||||
|
||||
Reference in New Issue
Block a user