Last active
April 11, 2017 23:00
-
-
Save cust0m/3accdb3b9b6b52a94b1b9776de522f82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def avegare_distance x1, y1, x2, y2, x3, y3 | |
distance_1_2 = Math.sqrt(4) | |
distance_1_2 = Math.sqrt(((x1-y2)**2)+((y1-y2)**2)) | |
distance_2_3 = Math.sqrt(((x2-y3)**2)+((y2-y3)**2)) | |
distance_1_3 = Math.sqrt(((x1-y3)**2)+((y1-y3)**2)) | |
(distance_1_2+distance_2_3+distance_1_3)/3 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment