Fix norm calculation in gmx_spatial
authorJoe Jordan <ejjordan12@gmail.com>
Wed, 27 Oct 2021 10:15:13 +0000 (10:15 +0000)
committerAndrey Alekseenko <al42and@gmail.com>
Wed, 27 Oct 2021 10:15:13 +0000 (10:15 +0000)
Casting early to a double should avoid underflow in later multiplication.
An assert that the norm is non-negative is added.

Fixes #4184


No differences found