@evolutionland/evolution-js
Version:
evolution evolution-js evolutionland evolution-js-sdk evolution-land metaverse
20 lines (19 loc) • 892 B
TypeScript
import JSBI from "jsbi";
import { BigintIsh, Rounding } from "../../constants";
export declare class Fraction {
readonly numerator: JSBI;
readonly denominator: JSBI;
constructor(numerator: BigintIsh, denominator?: BigintIsh);
get quotient(): JSBI;
get remainder(): Fraction;
invert(): Fraction;
add(other: Fraction | BigintIsh): Fraction;
subtract(other: Fraction | BigintIsh): Fraction;
lessThan(other: Fraction | BigintIsh): boolean;
equalTo(other: Fraction | BigintIsh): boolean;
greaterThan(other: Fraction | BigintIsh): boolean;
multiply(other: Fraction | BigintIsh): Fraction;
divide(other: Fraction | BigintIsh): Fraction;
toSignificant(significantDigits: number, format?: Record<string, unknown>, rounding?: Rounding): string;
toFixed(decimalPlaces: number, format?: Record<string, unknown>, rounding?: Rounding): string;
}