[ https://issues.apache.org/jira/browse/GEOMETRY-154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743597#comment-17743597 ]
Matt Juntunen commented on GEOMETRY-154: ---------------------------------------- [~dimitrios.efthymiou], I'm not sold on the idea of adding this method based on these use cases. For the graphics use case, there is already the {{EuclideanVector.lerp}} method, which linearly interpolates between two vectors. For the other use cases, one can compute the desired length ratios and then use scalar multiplication to get the desired vectors. The computation of the length ratios will depend on what the caller is trying to do and so should not be part of this library, IMHO. Ex: {code:java} // point between other points Vector3D a = Vector3D.of(1, 2, 3); Vector3D b = Vector3D.of(4, 5, 6); Vector3D midPoint = a.lerp(b, 0.5); // split the vector into two parts; in this case, we'll just do a simple 1/4, 3/4 split Vector3D oneQuarter = a.multiply(0.25); Vector3D threeQuarters = a.multiply(0.75); {code} > Implement divideVectorWithRatio(Vector x, double ratio) > ------------------------------------------------------- > > Key: GEOMETRY-154 > URL: https://issues.apache.org/jira/browse/GEOMETRY-154 > Project: Commons Geometry > Issue Type: New Feature > Components: euclidean1D, euclidean2D, euclidean3D > Reporter: Dimitrios Efthymiou > Priority: Minor > Labels: features > Original Estimate: 3h > Remaining Estimate: 3h > > It takes a vector, say, u = (10) and divides it with ratio, say 1/2. That > will return a pair of vectors v = (3.33) and w = (6.66). Regardless of > dimensions, both vectors start at the point of origin -- This message was sent by Atlassian Jira (v8.20.10#820010)