diff --git a/experiments/2024-10-30/src/math.rs b/experiments/2024-10-30/src/math.rs index 33ce9d7f2..887458bf7 100644 --- a/experiments/2024-10-30/src/math.rs +++ b/experiments/2024-10-30/src/math.rs @@ -10,6 +10,9 @@ impl Scalar { if value.is_nan() { panic!("`Scalar` value must not be NaN"); } + if value.is_infinite() { + panic!("`Scalar` value must not be infinite. Value: `{value}`"); + } Self { value } }