onemathCookbook
onemath cookbook
Short recipes for common OneMath tasks, each with complete code you can copy.
Recipes
Exact geometric predicatesDecide orientation, in-circle and segment intersection with OneMath’s exact predicates, and see how often the naive floating-point determinant gets the sign wrong.Port from System.NumericsMove matrix code from System.Numerics to OneMath without silently transposing your transforms: the conventions are opposite, and the conversions handle it.The fixed-point bridgeConvert between Q31.32 fixed-point world coordinates and double with OneMath’s FixedBridge, exactly, with one documented rounding where one is needed and a clear error outside the range.Inertia tensors and principal axesBuild the mass properties of a body from parts with OneMath: solid shapes, a combined center of mass and inertia tensor, and its principal axes, with the same bits on every platform.Check that two machines agreeHash a fixed OneMath computation and compare the hash across machines, runtimes and CPU features: the cheapest way to confirm a deterministic simulation will stay in sync.