How can I keep this number within 100 evenly?

Hey! I have this thing I’m working on and I have to distribute points evenly through the number 100 ( 100 can change depending on what object I have the script on ) and that number of points can also change.

It also is dependent on the objects scale. It seems to work with a scale of one but as soon as I scale it up any higher it breaks (Meaning the point goes over 100) but if it’s scale is at one it doesn’t matter how many points I add it always works. But as soon as I scale it up it doesnt matter if its 2 points it always breaks.

I know this is some math here but I can’t seem to figure it out. I have 100 / ammountOfPoints then I add that number to the points position and like I said it works at a scale of one but any higher it doesnt work.

Basically what the scale does it it makes each number 1 - 100 more spread out but that shouldn’t change anything. The points position cannot go over 100 or it breaks.

What I do is I get 100 / amountOfPoints * point = position of that point but Im not sure what im doing wrong. Anyone help thanks

my guess would be you use integer for points and this can result in not correct results

if you divide integers for example 100/200 = 1

if 100 is a float then the result would be 0.5f

float result = (float)100 / amountOfPoints * point*;*