Advertisement
Guest User

Project 4 calc page draft

a guest
Dec 11th, 2024
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | Software | 0 0
  1. def calcDistance(dX2,dX1,dY2, dY1):
  2.     distance = math.sqrt((dX2 - dX1)** 2 + (dY2 - dY1)** 2)
  3.     return distance
  4.  
  5. def calcMidpoint(mX1, mX2, mY1, mY2):
  6.     midpointX = (mX1 + mX2)/2
  7.     midpointY = (mY1 + mY2)/2
  8.     return midpointX, midpointY
  9.  
  10. def calcRadius(rX, rH, rY, rK):
  11.     radius = math.sqrt((rX - rH)**2 +(rY - rK)**2)
  12.     return radius
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement