Class CP::Vect
In: doc_dummy.rb
Parent: Object

Basic 2D vector class.

Methods

*   +   -   -@   /   cross   dot   length   near?   new   normalize   normalize!   perp   project   rotate   to_a   to_s   unrotate  

Attributes

x  [RW] 
y  [RW] 

Public Class methods

Public Instance methods

Scalar multiplication.

Vector addition.

Vector subtraction.

Vector negation.

Scalar division.

2D cross product analog. Z component of the 3D cross product.

Vector dot product.

Length of the vector.

Returns true if self and vect are within dist.

Normalize a vector.

Normalize a vector in place.

Get the perpendicular vector.

Vector projection of self onto vect.

Rotate and scale self by vect using complex multiplication.

Return the vector as an array.

[Validate]