Why i take number to string, the list of the number will add "0000"


this my code,i can use “remove” to delete the extra part, but i think its not a good idea…

the fist cirle ,such as 0.02,but for the second circle it will be 0.20000

can anyone help me, thank you very much :sob:

@Li_Zhuoran_2128 why don’t you use the String.Remove before the String.Insert? :slight_smile:

1 Like

oh,thannnnnk you, let me try

It’s all about object type. Doubles have inherent precision (even if it’s not displayed) so converting them to strings results in trailing zeros. An integer will convert with no trailing zeroes.
image

2 Likes

So will the 0 generated in the conversion process affect the nature of this code? If I remove the extra 0 later, will it have any effect?

At that point it’s a string so it doesn’t matter.

understand, thank u :partying_face:

Excuse me, is there a smarter modification method instead of manual modification

String.Remove isn’t manual - the configuration like that will work for 1 string or 1,000,000 without issue, and is the method I recommend

2 Likes

got it,i use it now