Skip to content

Instantly share code, notes, and snippets.

@akanehara
Created September 11, 2014 10:55
Show Gist options
  • Save akanehara/ae3e3f869c5aa08911d9 to your computer and use it in GitHub Desktop.
Save akanehara/ae3e3f869c5aa08911d9 to your computer and use it in GitHub Desktop.
(* 対称 *)
(* float * float -> (float * float) *)
let taisho_x p =
match p with
(x, y) -> (x, -. y)
let taisho_x1 = taisho_x (10., 20.) = (10., -20.)
let taisho_x2 = taisho_x (8., -5.2) = (8., 5.2)
let taisho_x3 = taisho_x (-10.5, 20.1) = (-10.5, -20.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment