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

+25
View File
@@ -0,0 +1,25 @@
#! @file divisible.sakura
#! @author John Christman (sorakatadzuma@gmail.com)
#! @copyright Malunal Studios, LLC.
#! @license MIT
#!
#! Contains the divisible trait, which asks for the method `/` calls between two
#! values of one type.
module core;
#! A type whose values divide by another of the type, giving one more.
#!
#! `a / b` calls `div`, and `a /= b` writes what it gives over `a`. A type has
#! `/` by declaring the method, and may declare others taking other types, as
#! `duration::div(&this, by: &i64)`. The trait is what generic code asks for to
#! divide two values of a type. Numbers are divisible without declaring
#! anything.
pub trait divisible {
#! Divides this value by another, as `/` does.
#! @param this The value to divide.
#! @param other The value to divide by.
#! @returns The quotient.
def div(&this, other: &self): self;
}