Skip to content

Commit

Permalink
Implement vector types.
Browse files Browse the repository at this point in the history
  • Loading branch information
nical committed Aug 19, 2016
1 parent f16a0b1 commit be1f408
Show file tree
Hide file tree
Showing 2 changed files with 736 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@ impl Ceil for u64 { fn ceil(self) -> Self { self } }
impl Ceil for usize { fn ceil(self) -> Self { self } }
impl Ceil for isize { fn ceil(self) -> Self { self } }

pub trait Sqrt { fn square_root(&self) -> Self; }

impl Sqrt for f32 { fn square_root(&self) -> f32 { self.sqrt() } }
impl Sqrt for f64 { fn square_root(&self) -> f64 { self.sqrt() } }
Loading

0 comments on commit be1f408

Please sign in to comment.