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 multipliable.sakura
#! @author John Christman (sorakatadzuma@gmail.com)
#! @copyright Malunal Studios, LLC.
#! @license MIT
#!
#! Contains the multipliable trait, which asks for the method `*` calls between
#! two values of one type.
module core;
#! A type whose values multiply by another of the type, giving one more.
#!
#! `a * b` calls `mul`, and `a *= b` writes what it gives over `a`. A type has
#! `*` by declaring the method, and may declare others taking other types, as
#! `vec2::mul(&this, by: &f64)`. The trait is what generic code asks for to
#! multiply two values of a type, as two matrices. Numbers are multipliable
#! without declaring anything.
pub trait multipliable {
#! Multiplies this value by another, as `*` does.
#! @param this The value to multiply.
#! @param other The value to multiply by.
#! @returns The product.
def mul(&this, other: &self): self;
}