commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Juntunen (JIRA)" <>
Subject [jira] [Commented] (GEOMETRY-50) Overflow in Vector norm and distance
Date Fri, 12 Apr 2019 12:58:00 GMT


Matt Juntunen commented on GEOMETRY-50:

bq. Creating double[] unnecessarily isn't performant.

I agree. I think that's why I didn't pursue this before.

bq. There should be overloads for SafeNorm.value() for 2 and 3 arguments

This should be another JIRA issue in commons-numbers. It can link back to this one.

> Overflow in Vector norm and distance
> ------------------------------------
>                 Key: GEOMETRY-50
>                 URL:
>             Project: Apache Commons Geometry
>          Issue Type: Bug
>            Reporter: Baljit Singh
>            Priority: Major
> In Euclidean Vector classes (Vector2D, Vector3D), norm() and distance() rely on Math.sqrt(),
which can overflow if the components of the vectors are large. Instead, they should rely on

This message was sent by Atlassian JIRA

View raw message