Skip to content

Allow custom formatting of magnitude of a quantity #108

@maekl

Description

@maekl

It would be nice to be able to customise the formatting of the magnitude of a quantity.

Maybe by introducing ShowMagnitude similar to ShowUnit and ShowDimension.

trait ShowMagnitude[A] {
  def apply(a: A): String
}

Default instance could use toString or maybe even it makes sense to use DecimalFormat (with a couple of significant digits) as the default for Double and BigDecimal

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