infinitewisdom.model.util
Class Vec2f
java.lang.Object
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
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
x
public double x
y
public double y
Vec2f
public Vec2f(double x,
double y)
Vec2f
public Vec2f(Vec2i o,
double quant)
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)