Created
April 25, 2013 22:34
-
-
Save chomado/5463790 to your computer and use it in GitHub Desktop.
2点の座標を受け取って中点の座標を求めます。
This file contains 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
(* 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