Wasting time doing maths on roblox? Well this module is for you!
If your a pretty bad at mathematics this module can solve percentages, mean, round numbers, find the square root, list factors + mutiples, list the range for numbers, list median for a number and if the number is even
function Math:isEven(num: number): boolean
local hasRemainder = math.fmod(num, 2)
local isEven
if hasRemainder == 0 then
isEven = true
else
isEven = false
end
return isEven
end
You can just do
function Math:isEven(num: number): boolean
return (num % 2) == 0
end
OR
function Math:isEven(num: number): boolean
return ( math.fmod(num, 2) ) == 0
end
Well a math module would be nice but this is simple mathematics which some are even built in functions within lua such as math.round() so if any advanced math were to be put in this then it would be really helpful.
i made a module like this once, trust me it’s not worth it. There are already really good maths modules Not saying your work is bad, just saying it already exists!