net.java.dev.joode.util
Interface ROVector2

All Known Implementing Classes:
Vector2

public interface ROVector2

A readonly two dimensional vector

Author:
Kevin Glass

Method Summary
 float dot(ROVector2 other)
          Get the dot product of this vector and another
 float getX()
          Get the X component of this vector
 float getY()
          Get the Y component of this vector
 float length()
          Get the length of this vector
 float lengthSquared()
          The length of the vector squared
 void projectOntoUnit(ROVector2 b, Vector2 result)
          Project this vector onto another
 

Method Detail

getX

float getX()
Get the X component of this vector

Returns:
The X component of this vector

getY

float getY()
Get the Y component of this vector

Returns:
The Y component of this vector

length

float length()
Get the length of this vector

Returns:
The length of this vector

dot

float dot(ROVector2 other)
Get the dot product of this vector and another

Parameters:
other - The other vector to dot against
Returns:
The dot product of the two vectors

projectOntoUnit

void projectOntoUnit(ROVector2 b,
                     Vector2 result)
Project this vector onto another

Parameters:
b - The vector to project onto
result - The projected vector

lengthSquared

float lengthSquared()
The length of the vector squared

Returns:
The length of the vector squared