Class RMVector
java.lang.Object
com.inductiveautomation.rm.graphics.RMVector
- All Implemented Interfaces:
- Cloneable
This class represents a 2D vector.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionadd(double X, double Y) Adds the vector components to this vector.Adds a vector.clone()Returns a basic clone of this object.doubleReturns the dot product of the receiver and the given vector.doubleReturns the magnitude of the vector.Returns the normalized vector.multiply(double aValue) Multiply vector by given magnitude.negate()Makes this receiver point in the opposite direction.Normalizes the vector.toString()Returns a string representation of the vector.
- 
Field Details- 
xpublic double x
- 
ypublic double y
 
- 
- 
Constructor Details- 
RMVectorpublic RMVector()Creates a new vector.
- 
RMVectorpublic RMVector(double X, double Y) Creates a new vector.
 
- 
- 
Method Details- 
addAdds a vector.
- 
addAdds the vector components to this vector.
- 
normalizeNormalizes the vector.
- 
negateMakes this receiver point in the opposite direction.
- 
multiplyMultiply vector by given magnitude.
- 
getMagnitudepublic double getMagnitude()Returns the magnitude of the vector.
- 
getDotProductReturns the dot product of the receiver and the given vector.
- 
getNormalizedReturns the normalized vector.
- 
cloneReturns a basic clone of this object.
- 
toStringReturns a string representation of the vector.
 
-