math cleanup: use 1.0f instead of (float)1.0