Touch Develop retirement postponed until June 22, 2019. Sign-in and access to cloud assets to be removed on May 23, 2018.Learn More..


Vector3

A 3D vector
function (Vector3) → add(other : Vector3) returns Vector3
Adds a vector
function (Vector3) → clamp(min : Vector3, max : Vector3) returns Vector3
Restricts the vector in the specified range
function (Vector3) → cross(other : Vector3) returns Vector3
Calculates the cross product with the other vector
function (Vector3) → distance(other : Vector3) returns Number
Gets the distance between the two vectors
function (Vector3) → is invalid returns Boolean
Returns true if the current instance is useless
function (Vector3) → length returns Number
Gets the length of the vector
function (Vector3) → linear interpolation(other : Vector3, amount : Number) returns Vector3
Linear interpolation between two vectors
function (Vector3) → multiply(other : Vector3) returns Vector3
Multiplies component-wise with a vector
function (Vector3) → negate returns Vector3
Returns a vector pointing in the opposite direction
function (Vector3) → normalize returns Vector3
Returns a vector of one unit pointing in the same direction as the original vector
function (Vector3) → post to wall
Displays the vector on the wall
function (Vector3) → scale(scalar : Number) returns Vector3
Multiplies with a scaling factor
function (Vector3) → subtract(other : Vector3) returns Vector3
Subtracts another vector
function (Vector3) → to string returns String
Turns the vector into a string
function (Vector3) → x returns Number
Gets the x-component
function (Vector3) → y returns Number
Gets the y-component
function (Vector3) → z returns Number
Gets the z-component

edit this topic jlfshvetth