狐狸接入
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
local Vector2D = {}
|
||||
local Vector2D = {
|
||||
Zero = {X = 0, Y = 0}
|
||||
}
|
||||
function Vector2D.New(x, y)
|
||||
return {X = x or 0, Y = y or 0}
|
||||
end
|
||||
@ -46,5 +48,10 @@ function Vector2D.ToUnrealEngine3D(vector, z)
|
||||
return new_vector
|
||||
end
|
||||
|
||||
function Vector2D.Equals(a, b, tolerance)
|
||||
local tol = tolerance or 0.001
|
||||
print(tol, a.X-b.X, a.Y-b.Y)
|
||||
return math.abs(a.X - b.X) < tol and math.abs(a.Y - b.Y) < tol
|
||||
end
|
||||
|
||||
return Vector2D
|
||||
Reference in New Issue
Block a user