Skip to content

Newton vs. Kilonewton #9

@abolz

Description

@abolz

The example in the readme states

unlib::newton<double> force = 1._kg * 9.81_m_per_s2;

In the above example, the right-hand side of the assignment operator calculates the force of earth's gravitational pull in kN which is used to initialize a quantity of the unit N. The conversion of the scale (kilo ==> unscaled) necessary for this is done implicitly during the assignment.

Did you intent to use tons instead of kilograms here? Right now the right-hand side already has the unit N and no conversion should be performed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions