Skip to content

Instantly share code, notes, and snippets.

@haroldofurtado
Created February 15, 2018 07:47
Show Gist options
  • Save haroldofurtado/2fe15164d3f6f8a61bd336dc5e4cf38d to your computer and use it in GitHub Desktop.
Save haroldofurtado/2fe15164d3f6f8a61bd336dc5e4cf38d to your computer and use it in GitHub Desktop.
def calc(x1, y1, x2, y2, x3, y3)
avgx = (x1+x2+x3)/3
avgy = (y1+y2+y3)/3
"#{avgx}, #{avgy}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment