What on earth is happening here

Why does the points value disregard that airtime is being rounded?
1
2
 scores = scores + Mathf.CeilToInt(airtime / 50);
         points = points + scores;

how do I fix this?
You don't show enough context.
What are the types of airtime, scores and points?
What does the Mathf.CeilToInt() do?
Ahhh .... more info?

What are the types?
Mathf.CeilToInt basically rounds a float or decimal places to an int with the lowest number possible.

Scores, airtime and points are all integers, however when airtime is divided by 50, it may not be an integer so I need to round it.
Last edited on
When you do divide an integer with an integer the result is always an integer where the fraction has been discarded.

E.g.
5/6 == 0
6/5 == 1
11/6 == 1
13/5 == 2
Topic archived. No new replies allowed.