add point
This commit is contained in:
parent
e7e40c3ce9
commit
47c442f84b
5 changed files with 27 additions and 7 deletions
11
src/point.ml
Normal file
11
src/point.ml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(* BSD-2-Clause License *)
|
||||
|
||||
type t =
|
||||
{ x : int
|
||||
; y : int
|
||||
}
|
||||
|
||||
let of_jv point =
|
||||
let x = Jv.get point "x" |> Jv.to_int in
|
||||
let y = Jv.get point "y" |> Jv.to_int in
|
||||
{ x; y }
|
||||
Loading…
Add table
Add a link
Reference in a new issue