public interface IDimension<S extends IDimension<S,T>,T extends Number> extends Comparable<S>
| Modifier and Type | Method and Description |
|---|---|
S |
fromNumber(T units)
Returns a separate instance of this type with the given number of units.
|
Class<T> |
numberType() |
T |
toNumber()
The Gosu runtime calls this method when performing default operations.
|
compareToT toNumber()
S fromNumber(T units)
The Gosu runtime calls this method when performing default operations. For instance, when adding two of the same dimension types, Gosu calls toNumber() on each operand, adds the numbers, and then calls fromNumber() for the result.
Copyright © 2017. All rights reserved.