Advertisement
CaptainSpaceCat

Physics Homework

Sep 15th, 2015
155
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local tArgs = {...}
  2.  
  3. rampLength = 0.93
  4.  
  5. function calculateDistance(rampHeight, tableHeight, rampAngle)
  6.     theta = rampAngle and math.rad(rampAngle) or math.asin(rampHeight/rampLength)
  7.     return math.sqrt(19.6*math.sin(theta)*rampLength)*math.cos(theta)*math.sqrt(tableHeight/4.905) -- .16 --?
  8.                               --rampHeight,     none
  9. end
  10.  
  11. --return math.sqrt(2*9.8*rampLength)*math.cos(theta)*math.sqrt(tableHeight/4.905)
  12.  
  13. print(calculateDistance(tArgs[1], tArgs[2], tArgs[3]))
Advertisement
RAW Paste Data Copied
Advertisement