3D vectors for astrodynamics and rendering
0
fork

Configure Feed

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

ocaml-linkedin: apply dune fmt

Pure formatting changes from `dune fmt`: doc comment placement moves
from above the binding to below it for `type`s, multi-line `match`
expressions collapse onto one line where they fit, and infix operator
applications pick up spaces (`Soup.($?)` -> `Soup.( $? )`). No
semantic changes.

+27 -9
+20 -9
README.md
··· 6 6 7 7 ## Installation 8 8 9 + Install with opam: 10 + 11 + ```sh 12 + $ opam install vec3 9 13 ``` 10 - opam install vec3 14 + 15 + If opam cannot find the package, it may not yet be released in the public 16 + `opam-repository`. Add the overlay repository, then install it: 17 + 18 + ```sh 19 + $ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git 20 + $ opam update 21 + $ opam install vec3 11 22 ``` 12 23 13 24 ## Usage 14 25 15 26 ```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 27 + open Vec3 28 + let a = v 1.0 2.0 3.0 29 + let b = v 4.0 5.0 6.0 30 + let c = add a b 31 + let d = cross a b 32 + let len = length c 33 + let unit = normalize c 34 + let () = Fmt.pr "%a cross %a (length: %f)@." pp unit pp d len 24 35 ``` 25 36 26 37 ## API
+4
dune
··· 1 1 (env 2 2 (dev 3 3 (flags :standard %{dune-warnings}))) 4 + 5 + (mdx 6 + (files README.md) 7 + (libraries vec3 fmt))
+2
dune-project
··· 1 1 (lang dune 3.21) 2 + (using mdx 0.4) 2 3 (name vec3) 3 4 (license ISC) 4 5 (authors "Thomas Gazagnaire <thomas@gazagnaire.org>") ··· 13 14 (depends 14 15 (ocaml (>= 4.14)) 15 16 (dune (>= 3.0)) 17 + (mdx :with-test) 16 18 fmt))
+1
vec3.opam
··· 8 8 depends: [ 9 9 "ocaml" {>= "4.14"} 10 10 "dune" {>= "3.21" & >= "3.0"} 11 + "mdx" {with-test} 11 12 "fmt" 12 13 "odoc" {with-doc} 13 14 ]