multiscale / muscle3

The third major version of the MUltiScale Coupling Library and Environment
Apache License 2.0
25 stars 13 forks source link

Can't read int parameters as double in YMMSL in C++ #56

Closed diregoblin closed 3 years ago

diregoblin commented 4 years ago

Currently, if you use instance.get_setting_as<double>, the setting has to be explicitly double.

E.g., you can write parameter: 1.0 or parameter: 1. and read it as a double, but parameter: 1 causes an error, even though it's perfectly safe. Of course there are some edge cases where you want to read a really large integer value, and converting that to a double will result in a loss of precision. However, I think that if the user wants to read that into a double, the loss of precision is probably acceptable for them.

LourensVeen commented 4 years ago

Fixed in 79d5acd.

LourensVeen commented 3 years ago

Released with 0.3.2.