Bugfix: Previous commit was incomplete. Use double instead of float throughout the library for consistancey