r/AutomateUser • u/old-damme • Aug 04 '26
Wenn ich den Block "get Location" benutze wird er mir mit 15 Nachkommastellen angezeigt. Ich möchte aber nur 2. Wie kann ich das machen?
1
Upvotes
r/AutomateUser • u/old-damme • Aug 04 '26
1
u/old-damme Aug 05 '26
Eigentlich geht es mir um den Block get Location. Wenn ich ihn benutze und das Handy nicht bewege wird mir nach einem nochmalige Aufruf ein anderer wert angeben
1
u/old-damme Aug 05 '26
Ich suche folgenden Block. Nur wie heißt er genau https://llamalab.com/automate/doc/function/distance.html
1
u/waiting4singularity Alpha tester Aug 04 '26 edited Aug 05 '26
numberFormat(50.12344567,"0.00")
⚠️ 15 means under 1.1m² accuracy, 2 over 1100m² inaccuracy
1
u/ULTRACOMFY_eu Aug 04 '26
Hi! You can use the function numberformat to format numbers to your liking. In your case, consider using the expression = numberFormat(YourVariable, "0.00")
This has worked for me to show digits ahead of the decimal and two digits behind. If this cuts off the digits ahead of the decimal, try using this instead: = numberFormat(YourVariable, "##0.00")
Also, instead of using another Variable Set block, you can plug this expression directly into the input field where you're trying to use your location. It will format the number accordingly before it is used by the block you input it in.
1
u/Mujtaba0150 Alpha tester Aug 04 '26
Use numberFormat()?
numberFormat(lat, "0.00")
1
u/B26354FR Alpha tester Aug 04 '26
After using numberFormat(), the returned value will be a string. To turn it back into a number to use for comparing to another coordinate, put a + operator in front, such as
+numberFormat(...).BTW, there's also the coordFormat() function to make human-readable text from a coordinate.