Anonymous user
Joystick position: Difference between revisions
→{{header|OCaml}}: handle window resized correctly
(added ocaml) |
(→{{header|OCaml}}: handle window resized correctly) |
||
Line 120:
let position app x y =
let
let
let
let hh = height /. 2.0 in
(hw +. ((x /. 100.0) *. hw),
hh +. ((y /. 100.0) *. hh))
|