Object lib serialization.
This commit is contained in:
@@ -87,6 +87,10 @@ function Vector3:setV( v )
|
||||
self.z = v.z
|
||||
end
|
||||
|
||||
function Vector3:serialize()
|
||||
return "Vector3:new("..self.x..","..self.y..","..self.z..")"
|
||||
end
|
||||
|
||||
function Vector3:arr()
|
||||
return { self.x, self.y, self.z }
|
||||
end
|
||||
@@ -123,6 +127,10 @@ function Vector3:max( v2 )
|
||||
return Vector3:newT( RL.Vector3Max( self, v2 ) )
|
||||
end
|
||||
|
||||
function Vector3:round()
|
||||
return Vector3:new( RL.Round( self.x ), RL.Round( self.y ), RL.Round( self.z ) )
|
||||
end
|
||||
|
||||
function Vector3:floor()
|
||||
return Vector3:new( math.floor( self.x ), math.floor( self.y ), math.floor( self.z ) )
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user