sc3-rom-dump/rom/help/vector.txt

18 lines
386 B
Plaintext
Raw Permalink Normal View History

2024-01-15 10:36:50 +01:00
Functions in the 3D Vector Math API:
vector.new( x,y,z )
Vectors returned by vector.new() have the following fields and methods:
vector.x
vector.y
vector.z
vector:add( vector )
vector:sub( vector )
vector:mul( number )
vector:dot( vector )
vector:cross( vector )
vector:length()
vector:normalize()
vector:round()
vector:tostring()
The +, - and * operators can also be used on vectors.