Hi,
While doing some tests, i found out that it is not possible to create quantities with NaN or Infinity.
I would like to know if it's an expected behavior.
import Qty from "js-quantities";
try {
new Qty(Infinity, 'mm');
} catch (e) {
console.log("Oupsi", e.message);
}
try {
new Qty(NaN, 'mm');
} catch (e) {
console.log("Oupsi...", e.message);
}
// Oupsi... Only number accepted as initialization value when units are explicitly provided
I am working on a system with python server. So i try to see if i can transpose everything on both sides.
For example, here is with Pint.
>>> import pint
>>> pint.Quantity(float('nan'), 'mm') / pint.Quantity(float('nan'), 's')
<Quantity(nan, 'millimeter / second')>
I was guessing javascript was already propagating NaN and Infinity properly inside js-quantities.
What do you think?
Hi,
While doing some tests, i found out that it is not possible to create quantities with NaN or Infinity.
I would like to know if it's an expected behavior.
I am working on a system with python server. So i try to see if i can transpose everything on both sides.
For example, here is with Pint.
I was guessing javascript was already propagating NaN and Infinity properly inside js-quantities.
What do you think?