rp1.rossum
Class RsVector
java.lang.Object
rp1.rossum.RsVector
- All Implemented Interfaces:
- java.io.Serializable
public class RsVector
- extends java.lang.Object
- implements java.io.Serializable
A representation of a 2-element vector with a limited set of
vector algebra operations; used for analysis.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x
public double x
y
public double y
NEARLY_ZERO
public static final double NEARLY_ZERO
- See Also:
- Constant Field Values
RsVector
public RsVector()
RsVector
public RsVector(RsVector v)
RsVector
public RsVector(double _x,
double _y)
unit
public RsVector unit()
throws java.lang.ArithmeticException
- Throws:
java.lang.ArithmeticException
unit
public RsVector unit(RsVector input)
throws java.lang.ArithmeticException
- Throws:
java.lang.ArithmeticException
normal
public RsVector normal()
normal
public RsVector normal(RsVector v)
magnitude
public double magnitude()
dot
public double dot(RsVector v)
turn
public static double turn(RsVector a,
RsVector b)
throws java.lang.ArithmeticException
- Throws:
java.lang.ArithmeticException
unitTurn
public static double unitTurn(RsVector a,
RsVector b)
add
public RsVector add(RsVector v)
add
public RsVector add(RsVector a,
RsVector b)
subtract
public RsVector subtract(RsVector v)
subtract
public RsVector subtract(RsVector a,
RsVector b)
scale
public RsVector scale(double scalar)
scale
public RsVector scale(double scalar,
RsVector v)