Class: Corner

Corner

new Corner()

A corner connection and location in a graph object
Properties:
Name Type Description
id number The id of the corner in the graph object
touches Polygon Set of polygon centers touching this objecyt
protrudes Array.<Line> Set of edges that are connected to this corner
adjacent Polygon Set of corners that connected to this corner

Extends

Methods

Add this vector with another vector element wise
Name Type Description
other Vector 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
other Vector 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
scalar number
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
other Vector The other vector
Returns:
Type Description
number The dot product of this and the other vector
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
scalar number 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

inherited perpendiculars(){Array.<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
radians number
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
other Vector 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