| Package | Description |
|---|---|
| tech.units.indriya.function |
This package provides functional interfaces and other functions including unit or quantity conversion.
|
| Modifier and Type | Field | Description |
|---|---|---|
static RationalNumber |
RationalNumber.ONE |
|
static RationalNumber |
RationalNumber.ZERO |
| Modifier and Type | Method | Description |
|---|---|---|
RationalNumber |
RationalNumber.abs() |
Returns a
RationalNumber whose value is the absolute value of this
RationalNumber. |
RationalNumber |
RationalNumber.add(RationalNumber that) |
Returns a new instance of
RationalNumber representing the addition
this + that. |
RationalNumber |
RationalNumber.divide(RationalNumber that) |
Returns a new instance of
RationalNumber representing the division
this / that. |
RationalNumber |
RationalNumber.multiply(RationalNumber that) |
Returns a new instance of
RationalNumber representing the
multiplication this * that. |
RationalNumber |
RationalNumber.negate() |
Returns a new instance of
RationalNumber representing the negation of
this. |
static RationalNumber |
RationalNumber.of(double number) |
Returns a
RationalNumber that represents the given double precision
number, with an accuracy equivalent to BigDecimal.valueOf(double). |
static RationalNumber |
RationalNumber.of(long dividend,
long divisor) |
Returns a
RationalNumber that represents the division
dividend/divisor. |
static RationalNumber |
RationalNumber.of(BigDecimal decimalValue) |
Returns a
RationalNumber that represents the given BigDecimal decimalValue. |
static RationalNumber |
RationalNumber.of(BigInteger dividend,
BigInteger divisor) |
Returns a
RationalNumber that represents the division
dividend/divisor. |
static RationalNumber |
RationalNumber.ofInteger(long number) |
Returns a
RationalNumber with divisor ONE. |
static RationalNumber |
RationalNumber.ofInteger(BigInteger number) |
Returns a
RationalNumber with divisor ONE. |
RationalNumber |
RationalNumber.pow(int exponent) |
Returns a new instance of
RationalNumber representing the reciprocal
of this. |
RationalNumber |
RationalNumber.reciprocal() |
Returns a new instance of
RationalNumber representing the reciprocal
of this. |
RationalNumber |
RationalNumber.subtract(RationalNumber that) |
Returns a new instance of
RationalNumber representing the subtraction
this - that. |
| Modifier and Type | Method | Description |
|---|---|---|
RationalNumber |
RationalNumber.add(RationalNumber that) |
Returns a new instance of
RationalNumber representing the addition
this + that. |
int |
RationalNumber.compareTo(RationalNumber that) |
Compares two
RationalNumber values numerically. |
RationalNumber |
RationalNumber.divide(RationalNumber that) |
Returns a new instance of
RationalNumber representing the division
this / that. |
RationalNumber |
RationalNumber.multiply(RationalNumber that) |
Returns a new instance of
RationalNumber representing the
multiplication this * that. |
static MultiplyConverter |
MultiplyConverter.ofRational(RationalNumber factor) |
|
RationalNumber |
RationalNumber.subtract(RationalNumber that) |
Returns a new instance of
RationalNumber representing the subtraction
this - that. |
Copyright © 2005–2023 Units of Measurement project. All rights reserved.