Skip to content

Setting roundingIncrement to 0.01 may cause unexpected behavior. The roundingIncrement property should typically be used with NSDecimalNumber values, and setting it to a floating-point value like 0.01 can introduce precision issues. Consider using NSDecimalNumber(string: "0.01") instead. #25

@rismay

Description

@rismay

Setting roundingIncrement to 0.01 may cause unexpected behavior. The roundingIncrement property should typically be used with NSDecimalNumber values, and setting it to a floating-point value like 0.01 can introduce precision issues. Consider using NSDecimalNumber(string: "0.01") instead.

    formatter.roundingIncrement = NSDecimalNumber(string: "0.01")

Originally posted by @Copilot in #24 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions