Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue Description

I made a new json which includes

"cm": {
    "Dimension": [0,1,0,0,0,0,0],
    "Value": 0.01},
"mm": {
    "Dimension": [0,1,0,0,0,0,0],
    "Value": 0.001},

now i have a calculation of m * cm * mm and it’s result is . when i leave out the m i get a result of mm².

On what basis is the resulting unit calculated.

And how can i change it? (i want cm in both lines)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

connorferstercommented, Dec 4, 2021

Hi @eagle-tex,

Ah, yes this part is less obvious. For specifying no prefix, as follows:

L = 3347.526*m
a = L.prefix('unity')

I need to update the documentation, badly. Ideally with a proper readthedocs site. Coming soon. Will update the Github page in the mean time.

connorferstercommented, Dec 3, 2021

Hi @DiegoTheWolf and @eagle-tex,

There is a method called .prefix() that accepts a string prefix to be “forced” upon the unit so that it always displays that way. It works like this:

a = 4 * m
b = 200 *mm
c = (a+b).prefix('c')

420.000 cm

The same would work as follows:

F2 = 1508*kN

1.508 MN


1508 kN

Read more comments on GitHub >

github_iconTop Results From Across the Web

Baby Changing Tables & Stations - IKEA
Check out our selection of baby changing tables at great prices -- featuring wall, cabinet and tabletop stations, baby care mats, accessories and...
Read more >
Shop | Changing Tables
Discover Changing Tables on at a great price. Our Nursery Furniture category offers a great selection of Changing Tables and more.
Read more >
Changing Tables & Dressers - Baby - Target
Pick from a collection of drawer dressers designed with a removable changing topper that lets you to use the dresser as a space-saving...
Read more >
Changing Tables in Nursery & Decor -
Baby Changing Tables Folding Diaper Changing Station with Wheels, Height Adjustable Mobile Nursery Organizer with Hanging Toy, Safety Belt & Storage Racks ...
Read more >
Changing Tables You'll Love in 2022 -
Find Changing Tables at Wayfair. Enjoy Free Shipping & browse our great selection of Nursery Furniture, Cribs, Kids Bookcases and more!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found