# Decimal: toFixed()

Formats the current value using fixed-point notation.

  • Interface
class MidaDecimal {
    toFixed (digits: number): MidaDecimal;
}
  • Example
import { decimal, } from "@reiryoku/mida";

const commission = decimal("123.456");
const formattedCommission = commission.toFixed(2); //= 123.46