My own corner of monopam
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

vec3: rewrite README example and declare fmt dep

Usage had `normalize dFormat.printf` collapsed. Rewrite as a
linear sequence of bindings printing the cross product and its
length. Switch to `Fmt.pr` (since `Vec3.pp : t Fmt.t`) and add
`fmt` to the mdx libraries so the block typechecks.

+12 -8
+8 -8
ocaml-vec3/README.md
··· 13 13 ## Usage 14 14 15 15 ```ocaml 16 - let open Vec3 in 17 - let a = v 1.0 2.0 3.0 in 18 - let b = v 4.0 5.0 6.0 in 19 - let c = add a b in 20 - let d = cross a b in 21 - let len = length c in 22 - let unit = normalize d in 23 - Format.printf "%a (length: %f)\n" pp unit len 16 + open Vec3 17 + let a = v 1.0 2.0 3.0 18 + let b = v 4.0 5.0 6.0 19 + let c = add a b 20 + let d = cross a b 21 + let len = length c 22 + let unit = normalize c 23 + let () = Fmt.pr "%a cross %a (length: %f)@." pp unit pp d len 24 24 ``` 25 25 26 26 ## API
+4
ocaml-vec3/dune
··· 1 1 (env 2 2 (dev 3 3 (flags :standard %{dune-warnings}))) 4 + 5 + (mdx 6 + (files README.md) 7 + (libraries vec3 fmt))