ta4j/src/main/java/eu/verdelhan/ta4j/Decimal.java
public Decimal max(Decimal other) {
        if ((this == NaN) || (other == NaN)) {
            return NaN;
        }
        return (compareTo(other) >= 0 ? this : other);
    }
public Decimal max(Decimal other) {
        if ((this == NaN) || (other == NaN)) {
            return NaN;
        }
        return (compareTo(other) >= 0 ? this : other);
    }
Returns the maximum of this {@code Decimal} and {@code other}.
@param  other value with which the maximum is to be computed
@return the {@code Decimal} whose value is the greater of this
{@code Decimal} and {@code other}.  If they are equal,
as defined by the {@link #compareTo(Decimal) compareTo}
method, {@code this} is returned.