moagg.types.math
Class Vector

java.lang.Object
  extended by moagg.types.math.Vector

public class Vector
extends java.lang.Object


Constructor Summary
Vector()
           
Vector(double x, double y)
           
Vector(Point p)
           
Vector(Vector v)
           
 
Method Summary
 void add(double x, double y)
           
 void add(Vector v)
           
static Vector add(Vector v1, Vector v2)
           
 void addX(double x)
           
 void addY(double y)
           
static double distance(Vector v1, Vector v2)
           
 boolean equals(java.lang.Object obj)
           
static Vector exp(double absValue, double angle)
           
 double getAbs()
           
 double getX()
           
 double getY()
           
 int hashCode()
           
 void mul(double scale)
           
static Vector mul(Vector v, double scale)
           
 void setX(double x)
           
 void setY(double y)
           
 void sub(double x, double y)
           
 void sub(Vector v)
           
static Vector sub(Vector v1, Vector v2)
           
 void subX(double x)
           
 void subY(double y)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vector

public Vector()

Vector

public Vector(double x,
              double y)

Vector

public Vector(Point p)

Vector

public Vector(Vector v)
Method Detail

setX

public void setX(double x)

getX

public double getX()

setY

public void setY(double y)

getY

public double getY()

getAbs

public double getAbs()

distance

public static double distance(Vector v1,
                              Vector v2)

addX

public void addX(double x)

addY

public void addY(double y)

add

public void add(double x,
                double y)

add

public void add(Vector v)

add

public static Vector add(Vector v1,
                         Vector v2)

subX

public void subX(double x)

subY

public void subY(double y)

sub

public void sub(double x,
                double y)

sub

public void sub(Vector v)

sub

public static Vector sub(Vector v1,
                         Vector v2)

mul

public void mul(double scale)

mul

public static Vector mul(Vector v,
                         double scale)

exp

public static Vector exp(double absValue,
                         double angle)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

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


Copyright © 2008. All Rights Reserved.