Vector3D class

A 3D vector with x, y, z components.

Constructors

Vector3D(double x, double y, double z)
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
magnitude → double
Magnitude (length) of this vector.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
x → double
final
y → double
final
z → double
final

Methods

cross(Vector3D other) → Vector3D
Cross product with another vector.
dot(Vector3D other) → double
Dot product with another vector.
normalized() → Vector3D
Returns a unit vector in the same direction. Returns zero vector if magnitude is zero.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator *(double scalar) → Vector3D
operator +(Vector3D other) → Vector3D
operator -(Vector3D other) → Vector3D
operator ==(Object other) → bool
The equality operator.
override
operator unary-() → Vector3D

Constants

unitX → const Vector3D
Unit vector along X axis.
unitY → const Vector3D
Unit vector along Y axis.
unitZ → const Vector3D
Unit vector along Z axis.
zero → const Vector3D
Zero vector.