new Corner()
A corner connection and location in a graph object
Extends
Methods
-
Add this vector with another vector element wise
Name Type Description otherVector The other vector Returns:
Type Description Vector The vector result of adding the two vectors -
inherited cross(other){number}
-
Get the cross product of this and the other vector
Name Type Description otherVector The other vector Returns:
Type Description number The cross product of this and the other vector -
Divide the vector by a scalar value
Name Type Description scalarnumber Returns:
Type Description Vector The result of multiplying the vector by a scalar -
inherited dot(other){number}
-
Get the dot product of this vector and another vector
Name Type Description otherVector The other vector Returns:
Type Description number The dot product of this and the other vector -
inherited key(){Symbol}
-
Get the vector key:Symbol representation
Returns:
Type Description Symbol The vector key element -
inherited list(){Array.<number>}
-
Get the vector in list form
Returns:
Type Description Array.<number> List representation of the vector of length 2 -
inherited magnitude(){number}
-
Get the magnitude of the vector
Returns:
Type Description number The magniture of the vector -
Multiply the vector by a scalar value
Name Type Description scalarnumber The number to multiply the vector by Returns:
Type Description Vector The result of multiplying the vector by a scalar element wise -
Get the normal vector of the current vector.
Returns:
Type Description Vector A vector that is the normal compenent of the vector -
Get the two normal vectors that are perpendicular to the current vector
Returns:
Type Description Array.<Vector> The two normal vectors that are perpendicular to the vector. The first vector is the normal vector that is +90 deg or +PI/2 rad. The second vector is the noraml vector that is -90 deg or -PI/2 rad. -
Get the get the current vector rotated by a certain ammount
Name Type Description radiansnumber Returns:
Type Description Vector The vector that results from rotating the current vector by a particular ammount -
Subtract this vector with another vector element wise
Name Type Description otherVector The other vector Returns:
Type Description Vector The vector result of subtracting the two vectors -
inherited toString(){string}
-
Returns the vector as a string of (x, y)
Returns:
Type Description string The string representation of a vector in (x, y) form