MathXFlexible math tool with chainable APIs.
constructor(value?: number, precision?: number, rounding?: "half-up" | "up" | "down")value: Initial value. Defaults to 0.precision: Decimal places. Defaults to 2.rounding: Rounding mode. Defaults to 'half-up'.MathX instance.set(value: number): thisvalue: New value.value(): numbersetPrecision(digits: number): thisdigits: Number of decimal places.setRounding(mode: "half-up" | "up" | "down"): thismode: Rounding mode ('half-up', 'up', 'down').clone(value?: number): MathXvalue: Optional new value.MathX instance.add(num: number): thisnum: Number to add.subtract(num: number): thisnum: Number to subtract.multiply(num: number): thisnum: Number to multiply.divide(num: number): thisnum: Number to divide by.num is 0.abs(): thissqrt(): thiscbrt(): thispow(exp: number): thisexp: Exponent.floor(): thisceil(): thisround(): thissign(): thisdegToRad(): thisradToDeg(): thismax(...nums: number[]): thisnums: Numbers to compare.min(...nums: number[]): thisnums: Numbers to compare.sin(): thiscos(): thistan(): thisasin(): thisacos(): thisatan(): thislog(): thislog10(): thisexp(): thistoExponential(fractionDigits?: number): stringfractionDigits: Number of digits after the decimal point. If omitted, uses as many digits as necessary.