Skip to content

Constructing an Amount from an Amount? #59

@ben-allen

Description

@ben-allen

In the comments for #49 the question of whether we should be able to construct an Amount from an Amount arose, which seems worth asking outside of the context of that issue.

So: bracketing off the questions related to using with to increase the number of significant digits that were raised in that issue, should we treat:

let a = new Amount(1.234, { significantDigits: 4 });
let b = new Amount(a, { significantDigits: 2 });

as equivalent to

let b = new Amount(1.234, {significantDigits: 4}).with({ significantDigits: 2 })

and, more generally, should we allow Amounts as arguments to the Amount constructor?

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