Class RMVector
- java.lang.Object
- 
- com.inductiveautomation.rm.graphics.RMVector
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 
 public class RMVector extends java.lang.Object implements java.lang.CloneableThis class represents a 2D vector.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description RMVectoradd(double X, double Y)Adds the vector components to this vector.RMVectoradd(RMVector aVector)Adds a vector.RMVectorclone()Returns a basic clone of this object.doublegetDotProduct(RMVector v2)Returns the dot product of the receiver and the given vector.doublegetMagnitude()Returns the magnitude of the vector.RMVectorgetNormalized()Returns the normalized vector.RMVectormultiply(double aValue)Multiply vector by given magnitude.RMVectornegate()Makes this receiver point in the opposite direction.RMVectornormalize()Normalizes the vector.java.lang.StringtoString()Returns a string representation of the vector.
 
- 
- 
- 
Method Detail- 
addpublic RMVector add(double X, double Y) Adds the vector components to this vector.
 - 
normalizepublic RMVector normalize() Normalizes the vector.
 - 
negatepublic RMVector negate() Makes this receiver point in the opposite direction.
 - 
multiplypublic RMVector multiply(double aValue) Multiply vector by given magnitude.
 - 
getMagnitudepublic double getMagnitude() Returns the magnitude of the vector.
 - 
getDotProductpublic double getDotProduct(RMVector v2) Returns the dot product of the receiver and the given vector.
 - 
getNormalizedpublic RMVector getNormalized() Returns the normalized vector.
 - 
clonepublic RMVector clone() Returns a basic clone of this object.- Overrides:
- clonein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() Returns a string representation of the vector.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-