Skip to content

abss-witch/derive-ops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom derive macros to implement component wise opperations.

use derive_cmp_ops::CmpOps;
#[derive(CmpOps)]
struct Point{
    a: f32,
    b: i8,
    c: i16
}

Alternatively you can include individual opperations.

use derive_cmp_ops::{CmpRemAssign, CmpMul};
#[derive(CmpRemAssign, CmpMul)]
struct Point{
    a: f32,
    b: i8,
    c: i16
}

Includes derives for add, add assign, sub, sub assign, mul, mul assign, div, div assign, rem, rem assign and neg

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages