Add hypotnuse method to Distance #7666
Labels
component: wpiunits
Java units library
type: feature
Brand new functionality, features, pages, workflows, endpoints, etc.
Is your feature request related to a problem? Please describe.
I'm always frustrated when I have to do distance.in(distanceUnit) followed by some math and then unit.of(resultOfMyMath)
Describe the solution you'd like
The same way there is .div and .plus methods for Distance I would like a .hypot(otherDistance) method. Using the plus method at Line 59 of Distance as an example I would write it like this:
Additional context
Here's what I'm currently using as a work around in my code:
The text was updated successfully, but these errors were encountered: