What is Incisor?
Tutorials
Key Concepts
Reddit
Stack Overflow
Deprecation Schedule

VectorBase

The 'base' object for the Vector1 type. This is not for general use - use Vector1 instead. [NON-INSTANTIABLE]

MEMBERS

dimension :number

The number of components this Vector has

inheritedTypes :object

Dictionary object listing all of the types this object is compatible with.

readonly type :string

Type identifier.

x :number

The first component of this Vector.

METHODS

clone() returns {Vector1}

Returns a new Vector1 with the same component values as this Vector.

Returns:
Vector1

copy(vector)

Sets all of this Vector's component values to the component values of the given Vector.

Parameters:
Name Type Attributes Default Description
vector Vector1    

The Vector to copy component values from.

isEqual(vector) returns {boolean}

Determines if all of the components of this Vector are equal to their counterparts in the given Vector.

Parameters:
Name Type Attributes Default Description
vector Vector1    

The Vector to compare against.

Returns:
boolean

multiply(vector)

Multiplies all components of this Vector by the given Vector.

Parameters:
Name Type Attributes Default Description
vector Vector1    

The Vector to multiply this Vector by.

multiplyByValues(x (opt))

Multiplies the components of this Vector by the values provided.

Parameters:
Name Type Attributes Default Description
x number <optional>
 

The value to multiply the first component by. [DEFAULT: 1]

scaleByFactor(factor)

Multiplies all Vector components by the given factor.

Parameters:
Name Type Attributes Default Description
factor number    

The value to multiply the Vector components by.