diff options
Diffstat (limited to 'examples/resources/lib/vector3.lua')
| -rw-r--r-- | examples/resources/lib/vector3.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/resources/lib/vector3.lua b/examples/resources/lib/vector3.lua index 86f5270..216962e 100644 --- a/examples/resources/lib/vector3.lua +++ b/examples/resources/lib/vector3.lua @@ -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 |
