 # Show decimal number

Hi all.
How do I make sure I always see a decimal number when driving a distance? Although the number of km is eg 5 to show 5.0
Thx

Multiply for 10,100,1000 etc depending the decimals you want, make floor of that and then divide again for the same value. For example, 3 digits after comma in #SWES#

``(floor(#SWES#*1000)/1000)``

That would not work with 0 at the end… 3.450 would show as 3.45

Is there anything you can suggest to solve this?

I need fixed decimal places

The only thing I can come up with is make layers with zeros and only show them when a number has no decimals. Probably doable for 1, harder if you need like 3 decimals…

An example watch face with inspection open would help envision what you are looking for

On one of my watchface I dealt with something similar. this is a distance calculation equation that shows zero if it is in decimal.

(floor((round((#ZSC#*0.00762)))/10)).((round(#ZSC#*0.00762))%10)

Inspection enabled.

3 Likes

Yes yes yes, that’s works! Thank You much!

(floor(#ZSC#*0.000762)).(floor(#ZSC#*0.00762)%10)(round(#ZSC#*0.0762)%10)

To two decimal places.

Inspection enabled.

3 Likes

How do you make it to three decimal places?

Fixed and added three decimal places.

2 Likes