Responsible for formatting percentages (10% instead of 0.1). Derived from Fraction entity.
import { Percent } from '@tradegen/sdk' const percent = new Percent('60', '100') console.log(percent.toSignificant(2)) // 60
toSignificant(significantDigits: number = 5, format?: object, rounding?: Rounding): string
toFixed(decimalPlaces: number = 2, format?: object, rounding?: Rounding): string
Last updated 3 years ago