Last active
September 5, 2020 17:52
-
-
Save cxmeel/8bf58b1456458045455e5716cfee0b42 to your computer and use it in GitHub Desktop.
Roblox Module for speed/distance/time calculations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
local Motion = {} | |
function Motion.GetDistance(Speed: number, Time: number): number | |
return Speed * Time | |
end | |
function Motion.GetTime(Distance: number, Speed: number): number | |
return Distance / Speed | |
end | |
function Motion.GetSpeed(Distance: number, Time: number): number | |
return Distance / Time | |
end | |
return Motion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment