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

Methods

   *   +   -   /   ==   []   []=   clamp   dot   hi   length   length2   lo   new   normalize  

Attributes

x  [RW] 
y  [RW] 

Public Class methods

Return an initialized FXVec2d instance.

Public Instance methods

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

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

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

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

Returns a new FXVec2d 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 or 1. 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.

Clamp the values of this vector between limits lo and hi.

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

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

Return the length (magnitude) of this vector.

Return the square of the length of this vector.

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

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

[Validate]