Risultato per difetto non funzionante

Salve a tutti,
provando ad effettuare una divisione, come resto ho 5 numeri decimali. Quindi ho provato ad utilizzare la funzione "Round", per riuscire ad arrotondare in difetto o in eccesso..ma non funziona :thinking:

1 Like

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

2 Likes

ciao,
io ho usato floor per troncare all'intero inferiore, o ceiling per arrotondare all'intero superiore, e funzionano.
Vedi se funzionano anche a te. Ciao.

I used floor to make a truncation to the integer number below the source floating number or ceiling to round to the upper integer, and they work. Please give it a try.
Cheers.

1 Like

please provide a screenshot... thank you
Taifun

2 Likes

@Taifun adesso ti riporto sia i blocchi rilevanti e sia lo screeshot della app.


Nonostante io abbia seguito il consiglio di @uskiara, il "volume" mi ritorna sempre con 4 cifre decimali e non di 2 cifre decimali come io vorrei.
Saluti
Nicola

Hi all,
I apologise but maybe I've misunderstood the needs of Nicola.
My needs were to compare the integer parts of two floating point numbers, and for this purpose I've used the "floor" block, which is working fine.
The picture below is just the small portion of the relevant code, the rest is a huge and boring list of blocks. :sweat_smile:
But Nicola, whether you need to approximate only two decimal digits you can use the foirmat as decimal number block, setting the number of decimal places.....
Ciao ciao.

uskiara come si utilizza il blocco di numeri decimali? Non l'ho mai usato

Hi Nicola,
yu can find the example in the code block that I have posted in my previous answer:

image .

Simply you assign a value to a floating point limiting the number of its decimal digits.

Ciao Nicola, trovi un esempio qui sopra.
Assegni alla variabile (o ad una label, in pratica a quello che ti serve) il valore di una variabile (o, come nel mio esempio, il risultato di un'operazione in floating) imponendo il massimo numero di decimali da utilizzare/visualizzare.
Spero che sia quello che ti serve. :v:
Ciao

2 Likes

uskiara grazie mille per il consiglio, adesso funziona tutto bene.
Saluti
Nicola

Wow, really happy that it works ! :hugs:

Grazie per il feedback.
Ciao, Ugo.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.