public interface CoercionConstants
import static manifold.science.util.CoercionConstants.*;
Then use them to conveniently express Rational
, BigDecimal
, and BigInteger
values like this:
Rational result = 3.0080111026763916015 r + 2.3456 r;
Note unlike floating point literals, these expressions retain the precision of the literal decimal values.Modifier and Type | Interface and Description |
---|---|
static class |
CoercionConstants.BigDecimalCoercion |
static class |
CoercionConstants.BigIntegerCoercion |
static class |
CoercionConstants.RationalCoercion |
Modifier and Type | Field and Description |
---|---|
static CoercionConstants.BigDecimalCoercion |
bd |
static CoercionConstants.BigIntegerCoercion |
bi |
static CoercionConstants.RationalCoercion |
r |
static final CoercionConstants.RationalCoercion r
static final CoercionConstants.BigDecimalCoercion bd
static final CoercionConstants.BigIntegerCoercion bi
Copyright © 2024. All rights reserved.