Guest User

Untitled

a guest
Feb 18th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. double x = (perpAB()*midAB().getX()-midAB().getY()-perpBC()*midBC().getX()+midBC().getY())/(perpAB()-perpBC());
  2. double y = perpAB()*x-perpAB()*midAB().getX()+midAB().getY();
  3. if(Double.isNaN(x)==true)
  4. {
  5. x = (perpAB()*midAB().getX()-midAB().getY()-perpAC()*midAC().getX()+midAC().getY())/(perpAB()-perpAC());
  6. y = perpAB()*x-perpAB()*midAB().getX()+midAB().getY();
  7. }
  8. if(Double.isNaN(x)==true)
  9. {
  10. x = (perpBC()*midBC().getX()-midBC().getY()-perpAC()*midAC().getX()+midAC().getY())/(perpBC()-perpAC());
  11. y = perpBC()*x-perpBC()*midBC().getX()+midBC().getY();
  12. }
  13. Point circumcenter = new Point(x,y);
  14. return circumcenter;
Add Comment
Please, Sign In to add comment