Skip to content

Instantly share code, notes, and snippets.

@esromneb
Created October 22, 2018 04:03
Show Gist options
  • Save esromneb/9390239f87ffd40d3fff5eeda0445964 to your computer and use it in GitHub Desktop.
Save esromneb/9390239f87ffd40d3fff5eeda0445964 to your computer and use it in GitHub Desktop.
simple way to find the slope from two points
if 1:
x1 = -659
y1 = -10000.0
x2 = 45
y2 = -40000.0
m = (y2-y1)/(x2-x1)
print "slope ", m
b = y2-(m*x2)
print "b ", b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment