summaryrefslogtreecommitdiff
path: root/Data/BuiltIn/Libraries/GameLab/Engine/Math/init.lua
blob: 4180e5f435748ce71f3b7ae6932ad1db260ef430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
local math = GameLab.Package("GameLab.Engine.Math")

local import = GameLab.import(...)

import("Math")
import("Vector2")
import("Vector3")
import("Vector4")
import("Matrix44")
import("Matrix33")
import("Quaternion")
import("Rect")

GameLab.Debug.Log("GameLab.Engine.Math loaded")

math.Max = function(a, b)
    return a >= b and a or b
end 

math.Min = function(a, b)
    return a <= b and a or b
end 

math.Clamp = function(v, min, max)
    return math.Min(math.Max(v, min), max)
end 

return math