Libraryless. Click here for Pure Java version (681L/4K).
1 | static LineThroughPoint perpendicularBisector(IDoublePt a, IDoublePt b) { |
2 | DoublePt midpoint = doublePt((a.x_double()+b.x_double())/2, (a.y_double()+b.y_double())/2); |
3 | double angle = atan2(b.y_double()-a.y_double(), a.x_double()-b.x_double()); |
4 | ret LineThroughPoint(midpoint, angle); |
5 | } |
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035465 |
Snippet name: | perpendicularBisector |
Eternal ID of this version: | #1035465/2 |
Text MD5: | 61d2e90d37dc792a87b4e80e7530f7b8 |
Transpilation MD5: | 6d10186195edecf84efa21cf88968c33 |
Author: | stefan |
Category: | javax / math |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-05-21 18:33:31 |
Source code size: | 292 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 142 / 196 |
Version history: | 1 change(s) |
Referenced in: | [show references] |