Package com.j3d.engine.math.convert
Class Offset
A simple immutable class which stores an
X and Y offset when converting
between ScreenPoint and CartesianPoint using their offset overloads.- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OffsetA constant identical to instantiating the class with 0 as both values. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromMutablePair(MutablePair<T, T> mutablePair) intReturns the X offsetintReturns the Y offset
-
Field Details
-
ZERO
A constant identical to instantiating the class with 0 as both values.
-
-
Constructor Details
-
Offset
public Offset(int x, int y) Default Constructor- Parameters:
x- The X offsety- The Y offset
-
Offset
Constructor from a same pair of integers- Parameters:
samePair- The same pair
-
-
Method Details
-
getXOffset
public int getXOffset()Returns the X offset- Returns:
- The X offset component
-
getYOffset
public int getYOffset()Returns the Y offset- Returns:
- The Y offset component
-
fromMutablePair
-