Removed usage of FloatMath since it's slower than plain Math since API level 8.