Pass numeric values as doubles instead of integers

This approach is indeed very generic, but it’s more of a quick fix I
needed for my project.