Initial Commit
This commit is contained in:
706 files changed
+135430
No files matched your search
@@ -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 {}
|
||||
Reference in new issue
Block a user