#63 Refactoring: consistently use (float) instead of (double) for typecasting