Represents a circular 3D vector in space.
number
The x-coordinate of the vector.
number
The y-coordinate of the vector.
number
The z-coordinate of the vector.
Calculates the length of a vector.
Parameter | Type | Description |
---|---|---|
vector | CircularChart3DVector |
The vector to calculate the length of. |
Returns number
Calculates the normal vector of a triangle defined by three vectors.
Parameter | Type | Description |
---|---|---|
v1 | CircularChart3DVector |
The first vertex of the triangle. |
v2 | CircularChart3DVector |
The second vertex of the triangle. |
v3 | CircularChart3DVector |
The third vertex of the triangle. |
Returns CircularChart3DVector
Checks if a vector is valid (not NaN for any component).
Parameter | Type | Description |
---|---|---|
point | CircularChart3DVector |
The vector to check. |
Returns boolean
Creates a new Vector3D instance from provided coordinates.
Parameter | Type | Description |
---|---|---|
vx | Object | number |
Either an object with x and y properties or the x-coordinate. |
vy | number |
The y-coordinate. |
vz | number |
The z-coordinate. |
Returns CircularChart3DVector
Calculates the dot product of two vectors.
Parameter | Type | Description |
---|---|---|
v1 | CircularChart3DVector |
The first vector. |
v2 | CircularChart3DVector |
The second vector. |
Returns number
Subtracts one vector from another and returns the result.
Parameter | Type | Description |
---|---|---|
v1 | CircularChart3DVector |
The first vector. |
v2 | CircularChart3DVector |
The second vector to subtract from the first. |
Returns CircularChart3DVector
Multiplies two vectors using the cross product and returns the result.
Parameter | Type | Description |
---|---|---|
v1 | CircularChart3DVector |
The first vector. |
v2 | CircularChart3DVector |
The second vector. |
Returns CircularChart3DVector
Adds two vectors and returns the result.
Parameter | Type | Description |
---|---|---|
v1 | CircularChart3DVector |
The first vector. |
v2 | CircularChart3DVector |
The second vector to add to the first. |
Returns CircularChart3DVector
Multiplies a vector by a scalar value.
Parameter | Type | Description |
---|---|---|
v1 | CircularChart3DVector |
The vector to multiply. |
value | number |
The scalar value. |
Returns CircularChart3DVector