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