Skip to content

Instantly share code, notes, and snippets.

@chomado
Created April 25, 2013 22:34
Show Gist options
  • Save chomado/5463790 to your computer and use it in GitHub Desktop.
Save chomado/5463790 to your computer and use it in GitHub Desktop.
2点の座標を受け取って中点の座標を求めます。
(* chuten : float * float -> float * float -> float * float *)
let chuten point1 point2 = match point1 with
(x1, y1) -> ( match point2 with
(x2, y2) -> ((x1 +. x2)/.2.0, (y1 +. y2)/.2.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment