Documentation

Vector2f

Constructible This class can be instantiated from your script. You can find more information on the Constructor below. Auto Destroy Instances of this class will be deleted automatically. Custom Properties You cannot add your own properties to instances of this class. They will not be saved and can cause undefined behavior.

Constructor

Vector2f(number x, number y)

  • x: optional X value
  • y: optional Y value

Example

var vector2f = new Vector2f();

Properties

Name Type Description
x number X value
y number Y value
length number read only length of the Vector2f

Functions

Vector2f.mul(Vector2f vec)

returns: Vector2f

Parameter

Name Type Description
vec Vector2f

Vector2f.div(Vector2f vec)

returns: Vector2f

Parameter

Name Type Description
vec Vector2f

Vector2f.sub(Vector2f vec)

returns: Vector2f

Parameter

Name Type Description
vec Vector2f

Vector2f.add(Vector2f vec)

returns: Vector2f

Parameter

Name Type Description
vec Vector2f

Stay informed

By becoming the newest member of our growing forums, we and hundreds of other players will always keep you up to date on everything JC3:MP related.