atmoos / atmoos/Quantities

Add Normalisation

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted question
Dominant language
C#
Stars
5
Forks
0
Avg merge
6m
Merged PRs (30d)
4

Description

Add a `Normalise(): String` method.

Scenario: Say you have a length instance of `78'167 μm`. This is an unwieldy representation for humans to read. More natural forms of the same length would be `78.167 mm` or `7.817 cm`, where the latter value has been rounded.

Tasks:
- Find a good name for that method ("Normalised", "DisplayValue", "HumanReadable", etc. could be other names)
- Decide whether the value should or should not be rounded to max. three digits
- Find an implementation that efficiently computes the normalization for values in the **metric system**
- For the imperial system decide whether:
- To *not* implement this functionality
- To convert the value to a metric value that can be normalised
- To convert the value to the "best" representation within the same system (This may open up a can of worms...)

Note also the example in the readme: 3'456 Km/d => 40 m/s
- Is that a good normalization? (people are more used to Km/h)
- Compound Quantities will be hard to reasonably normalise...

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the existing quantity and unit APIs, then inspect the README example using 3'456 Km/d. The issue leaves the method name, rounding rules, imperial behavior, and compound-quantity handling undecided; done would require an agreed design before implementation and validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.