equation-sdk
Version:
🛠 An SDK for building applications on top of Equation.
34 lines (33 loc) • 2.5 kB
TypeScript
import Decimal from 'decimal.js';
export declare function isNumeric(value: Decimal.Value): boolean;
export declare function plus(value1: Decimal.Value, value2: Decimal.Value): string;
export declare function minus(value1: Decimal.Value, value2: Decimal.Value): string;
export declare function multipliedBy(value1: Decimal.Value, value2: Decimal.Value): string;
export declare function div(value1: Decimal.Value, value2: Decimal.Value): string;
export declare function abs(value: Decimal.Value): string;
export declare function neg(value: Decimal.Value): string;
export declare function trunc(value: Decimal.Value): string;
export declare function mod(value1: Decimal.Value, value2: Decimal.Value): string;
export declare function isGreaterThan(value1: Decimal.Value, value2: Decimal.Value): boolean;
export declare function isGreaterThanOrEqual(value1: Decimal.Value, value2: Decimal.Value): boolean;
export declare function isLessThan(value1: Decimal.Value, value2: Decimal.Value): boolean;
export declare function isLessThanOrEqualTo(value1: Decimal.Value, value2: Decimal.Value): boolean;
export declare function isEqualTo(value1: Decimal.Value, value2: Decimal.Value): boolean;
export declare function isZero(value: Decimal.Value | undefined): boolean;
export declare function isPositive(value: Decimal.Value | undefined): boolean;
export declare function isNegative(value: Decimal.Value | undefined): boolean;
export declare function mulDiv(a: Decimal.Value, b: Decimal.Value, c: Decimal.Value, roundingMode?: Decimal.Rounding, precision?: number): string;
export declare function bigIntMulDiv(x: bigint, y: bigint, denominator: bigint, ceil?: boolean): bigint;
export declare function bigIntMulDiv2(x: bigint, y: bigint, denominator: bigint): {
down: bigint;
up: bigint;
};
export declare function ceilDiv(a: Decimal.Value, b: Decimal.Value, precision?: number): string;
export declare function floorDiv(a: Decimal.Value, b: Decimal.Value, precision?: number): string;
export declare function solveQuadraticEquation(a: Decimal.Value, b: Decimal.Value, c: Decimal.Value): string[];
/**
* (y - y₁) / (x - x₁) = (y₂ - y₁) / (x₂ - x₁)
* x = ((y - y₁) / (y₂ - y₁)) * (x₂ - x₁) + x₁
*/
export declare function getPointOnLine(y: Decimal.Value, x1: Decimal.Value, y1: Decimal.Value, x2: Decimal.Value, y2: Decimal.Value): string;
export declare function getPointSize(BR: Decimal.Value, L: Decimal.Value, Pi: Decimal.Value): string;