23 Commits

Author SHA1 Message Date
4352c03d20 tuples: move tests from doctest to unit. 2021-07-30 21:23:56 -07:00
4936839723 prelude: create prelude and add some tuple helpers to it. 2021-07-22 21:34:18 -07:00
de898f0b0a Add builder pattern to a few core types.
Add a From<[3;Float]> impl for Color to make things nicer.
2021-07-21 20:42:08 -07:00
a553786807 tuples: derive Default on Tuple. 2021-07-21 19:40:12 -07:00
95de5863cc all: s/f32/Float/g now using customer Float alias. 2021-07-18 17:18:08 -07:00
385ed70d88 tuples: implement EPSILON aware PartialEq for Color.
Mark Color::new const so it can be used in const expressions (like
predefining colors).
2021-07-17 09:30:28 -07:00
bcf847660a tuples: implement reflect. 2021-07-17 08:50:26 -07:00
339ce84903 tuples: whitespace cleanup for consistency. 2021-07-17 07:58:15 -07:00
4b0d882b84 lib & tuples: use crate specific EPSILON definition. 2021-07-16 16:49:55 -07:00
b8df830460 tuples & matrices: remove float-cmp use.
All checks were successful
continuous-integration/drone/push Build is passing
Implement PartialEq on `Tuple` and `Matrix4x4` using a local `EPSILON`
large enough for our unit tests to pass.
2021-07-06 08:44:21 -07:00
245b02b443 matrices: implement Matrix4x4:rotation_[xyz] 2021-07-05 18:36:43 -07:00
656f1c3a94 Small whitespace change. 2021-07-05 16:26:21 -07:00
3cf580f607 Fix tests after recent refactor 2021-06-29 19:52:57 -07:00
78a360ae89 More idiomatic constructors.
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-27 10:20:21 -07:00
536b6bed1f tuples: make color data pub. 2021-06-24 16:40:21 -07:00
d8f91a823e Add canvas type. 2021-06-24 15:58:18 -07:00
42455d593e Add Color type. 2021-06-24 15:48:04 -07:00
df495feb57 Make important types/functions public. 2021-06-24 15:35:43 -07:00
21afbf8e7c Implement dot and cross product for tuples. 2021-06-24 15:15:31 -07:00
1ea90770bc Add magnitude() and normalize() methods to Tuple 2021-06-24 15:07:38 -07:00
758f94acde Implement Add, Div, Mul, Neg, Sub traits for tuple. 2021-06-24 14:47:53 -07:00
3952a8ba83 Implement point/vector constructors. 2021-06-24 11:10:11 -07:00
495c64249c Implement most basic tuple 2021-06-24 10:51:35 -07:00