Comments and answers for "strange maths division error-unityscript"
http://answers.unity.com/questions/412029/strange-maths-division-issue-javascript.html
The latest comments and answers for the question "strange maths division error-unityscript"Answer by OperationDogBird
http://answers.unity.com/answers/412033/view.html
It looks like integer math is taking place. If you make either number a float first you will get the proper output.
var size1:float = 1.0/(size - 1);
if(x==20)Debug.Log( "size "+ size + " divider " + size1*1000 );Wed, 06 Mar 2013 20:47:05 GMTOperationDogBirdAnswer by Eric5h5
http://answers.unity.com/answers/412032/view.html
It's not an error, it's expected behavior because you're using integer division. Making the variable a float doesn't cause Unity use float division when all of the numbers involved in the division are integers. So you need to make at least one of the numbers a float.Wed, 06 Mar 2013 20:44:55 GMTEric5h5