3D vectors for astrodynamics and rendering
0
fork

Configure Feed

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

Add missing READMEs; expand short ones

New READMEs for: ocaml-auth, ocaml-cose, ocaml-http, ocaml-osv,
ocaml-rego, ocaml-scitt, ocaml-sigstore, ocaml-vec3.

Expanded: ca-certs (7→40 lines), osrelease (8→45 lines).

Each includes: synopsis, installation, usage example, API overview,
and license. Skipped ocaml-cel and ocaml-chor (no code yet).

+39
+39
README.md
··· 1 + ## vec3 -- 3D vectors for astrodynamics and rendering 2 + 3 + Minimal 3D vector library providing a shared type for astrodynamics, 4 + coordinate transforms, and rendering. Used as the common vector type across 5 + kepler, sgp4, globe, and coordinate packages. 6 + 7 + ## Installation 8 + 9 + ``` 10 + opam install vec3 11 + ``` 12 + 13 + ## Usage 14 + 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 24 + ``` 25 + 26 + ## API 27 + 28 + - `v x y z` -- create a vector 29 + - `zero` -- the zero vector 30 + - `add`, `sub`, `scale`, `negate` -- arithmetic 31 + - `dot`, `cross` -- products 32 + - `length`, `distance` -- metrics 33 + - `normalize` -- unit vector (returns `zero` if near-zero input) 34 + - `equal ?eps` -- approximate equality (default epsilon: 1e-12) 35 + - `pp` -- pretty-printer 36 + 37 + ## License 38 + 39 + ISC