I need to extract the decimal part of a float number, but I get weird results:
float n = 22.65f; // I want x = 0.65f, but... x = n % 1; // x = 0.6499996 x
I think this would be the most simple way :
float n = 22.65f; float x = n - (int) n;