Class Decimal

See the Rust documentation for Decimal for more information.

Accessors

Methods

  • See the Rust documentation for ceil for more information.

    Parameters

    • position: number

    Returns void

  • Concatenates other to the end of self.

    If successful, other will be set to 0 and a successful status is returned.

    If not successful, other will be unchanged and an error is returned.

    See the Rust documentation for concatenate_end for more information.

    Parameters

    Returns boolean

  • See the Rust documentation for digit_at for more information.

    Parameters

    • magnitude: number

    Returns number

  • See the Rust documentation for expand for more information.

    Parameters

    • position: number

    Returns void

  • See the Rust documentation for floor for more information.

    Parameters

    • position: number

    Returns void

  • Zero-pad the Decimal on the right to a particular position

    See the Rust documentation for pad_end for more information.

    Parameters

    • position: number

    Returns void

  • Zero-pad the Decimal on the left to a particular position

    See the Rust documentation for pad_start for more information.

    Parameters

    • position: number

    Returns void

  • Round the number at a particular digit position.

    This uses half to even rounding, which resolves ties by selecting the nearest even integer to the original value.

    See the Rust documentation for round for more information.

    Parameters

    • position: number

    Returns void

  • Truncate the Decimal on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years ("2022" -> "22")

    See the Rust documentation for set_max_position for more information.

    Parameters

    • position: number

    Returns void

  • See the Rust documentation for trunc for more information.

    Parameters

    • position: number

    Returns void