Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #1035465 // perpendicularBisector

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (681L/4K).

static LineThroughPoint perpendicularBisector(IDoublePt a, IDoublePt b) {
  DoublePt midpoint = doublePt((a.x_double()+b.x_double())/2, (a.y_double()+b.y_double())/2);
  double angle = atan2(b.y_double()-a.y_double(), a.x_double()-b.x_double());
  ret LineThroughPoint(midpoint, angle);
}

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: 141 / 195
Version history: 1 change(s)
Referenced in: [show references]