Convert float to int

iPhone SDK Tips & Tricks


int myInteger = (int)(myFloat * 3.280839895 + 0.5);

float -> 23.0000
int -> 23