I have a float variable and would like to get only the part after the comma, so if I have 3.14. I would like to get 14 as an integer. How can I do that?
float x = 3.14 int fractionalPortionAsInt = (int) (100 * (x - Math.Floor(x)));