servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
458 stars 102 forks source link

Implement `distance_to` method for points #428

Closed hannobraun closed 4 years ago

hannobraun commented 4 years ago

I don't know, if such a simple helper method is considered acceptable for this crate, but I figured the best way of asking that question is by just submitting a pull request.

I'm also not sure about the return value. It seems like returning Length would be the right thing to do, but that's not what the length methods return. I figured I'd follow that established convention, but I'm happy to make changes as requested.

nical commented 4 years ago

Looks good to me, thanks.

It seems like returning Length would be the right thing to do, but that's not what the length methods return. I figured I'd follow that established convention

We'll probably add back Length variants of some methods when we have figured out a good naming convention. In any case, following the established convention is the right thing to do here.

@bors-servo r+

bors-servo commented 4 years ago

:pushpin: Commit 8e2baba has been approved by nical

bors-servo commented 4 years ago

:hourglass: Testing commit 8e2babacca456cf633f58383978cfb9645d2577a with merge 357d645dcb723df3f956eda624576bd9c532f116...

bors-servo commented 4 years ago

:sunny: Test successful - checks-travis Approved by: nical Pushing 357d645dcb723df3f956eda624576bd9c532f116 to master...