Class Fox::FXVec
In: rdoc-sources/FXVec.rb
Parent: Object

Methods

   *   +   -   /   ==   []   []=   cross   dot   hi   len   lo   new   normalize   normalize!   to_a  

Public Class methods

Return an initialized FXVec instance.

Public Instance methods

Returns a new FXVec instance which is the negation of this one.

Returns a new FXVec instance obtained by memberwise multiplication of this vector’s elements by the scalar n.

Returns a new FXVec instance obtained by memberwise addition of the other FXVec instance with this one.

Returns a new FXVec instance obtained by memberwise subtraction of the other FXVec instance from this one.

Returns a new FXVec instance obtained by memberwise division of this vector’s elements by the scalar n. Raises ZeroDivisionError if n is identically zero.

Return true if this vector is equal to other.

Returns the element at index, where index is 0, 1 or 2. Raises IndexError if index is out of range.

Set the element at index to value and return value. Raises IndexError if index is out of range.

Return the cross product of this vector and other.

Returns the dot (scalar) product of this vector and other.

Return a new FXVec instance which is the greater of this vector and other.

Return the length (magnitude) of this vector.

Return a new FXVec instance which is the lesser of this vector and other.

Return a new FXVec instance which is a normalized version of this one.

Normalize this vector and return a reference to it.

Return a new Array instance with this vector’s elements as its members.

[Validate]