Removed floating point calculation to reduce library overhead.