Initial Commit

This commit is contained in:
SoraKatadzuma committed 2026-10-28 22:13:49 -05:00
commit 05756094ac
706 files changed
+135430

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#! @file additive.sakura
#! @author John Christman (sorakatadzuma@gmail.com)
#! @copyright Malunal Studios, LLC.
#! @license MIT
#!
#! Contains the additive trait, which a type implements to add, subtract, and
#! negate its values, and which every number has.
module core;
#! A type whose values add, subtract, and negate, all as one type: lengths of
#! time, vectors, matrices, amounts of money.
#!
#! It composes `addable`, `subtractable`, and `negatable`, which give `+`, `-`,
#! and `-x`, beside `equatable`. It asks for no multiplication, since two
#! lengths of time have no product. Numbers are additive without declaring
#! anything.
#!
#! Within a generic bounded by it, a constant does not stand for a value, as it
#! does under `numeric`: a length of time is no number.
pub trait additive : equatable, addable, subtractable, negatable {}