3 ms·Tl;dr: Use int i = round(f); instead of: int i = (int)f;by loeg 14y agoTl;dr: Use int i = round(f); instead of: int i = (int)f;