Ray2¶
Overview¶
2-dimensional ray consisting of an origin point and a unit direction vector.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class Ray2¶
Constructor¶
new Ray2( position : Vector2, direction : Vector2 )¶
Instance Methods¶
shifted( distance : number ) : Ray2¶
Returns a new Ray that has it origin shifted to a position given by an amount distance*this.direction.
pointAtDistance( distance : number ) : Vector2¶
Returns a position that is a distance 'distance' along the ray.
toString() : string¶
Returns the attributes of this ray into a string