infinitewisdom.model.util
Class Vec2f

java.lang.Object
  extended by infinitewisdom.model.util.Vec2f
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Vec2f
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

See Also:
Serialized Form

Field Summary
 double x
           
 double y
           
 
Constructor Summary
Vec2f(double x, double y)
           
Vec2f(Vec2i o, double quant)
           
 
Method Summary
 void add(Vec2f o)
           
 Vec2f clone()
           
 double dist(Vec2f o)
           
 double dist(Vec2i o, double quant)
           
 double dot(Vec2f o)
          Dot product.
 double getX()
           
 double getY()
           
 double length()
           
 void muls(double s)
          Multiply with scalar.
 void mulvt(Vec2f o)
          Multiply with transposed vector.
 void normalize()
           
 void set(Vec2f o)
           
 void setX(double x)
           
 void setY(double y)
           
 void sub(Vec2f o)
           
 void sub(Vec2i o, double quant)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x

y

public double y
Constructor Detail

Vec2f

public Vec2f(double x,
             double y)

Vec2f

public Vec2f(Vec2i o,
             double quant)
Method Detail

add

public void add(Vec2f o)

muls

public void muls(double s)
Multiply with scalar.


mulvt

public void mulvt(Vec2f o)
Multiply with transposed vector. (i.e. elemntwise muliplication)


dot

public double dot(Vec2f o)
Dot product.


getX

public double getX()

setX

public void setX(double x)

getY

public double getY()

setY

public void setY(double y)

sub

public void sub(Vec2f o)

sub

public void sub(Vec2i o,
                double quant)

dist

public double dist(Vec2f o)

dist

public double dist(Vec2i o,
                   double quant)

length

public double length()

normalize

public void normalize()

clone

public Vec2f clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

set

public void set(Vec2f o)