Formatting

This commit is contained in:
Brendan Zabarauskas 2012-11-06 12:01:39 +10:00
parent 40e847f34f
commit 89d600af22
3 changed files with 10 additions and 10 deletions

View file

@ -1,8 +1,8 @@
/**
* This trait allows you to easily cast between the built in numeric types,
* going above and beyond the static 'to_int' function found in the Num trait.
* I've found that it is especially handy in generic functions when you need to
* mix floating point and integer values.
* This trait allows for the easy casting between each of thethe built in
* numeric types, going above and beyond the static 'to_int' function found in
* the Num trait. I've found that it is especially handy in generic functions
* when you need to mix floating point and integer values.
*/
trait NumCast {
static pure fn from<T:NumCast>(n: T) -> self;

View file

@ -66,13 +66,13 @@ pub mod Quat {
}
#[inline(always)]
pub pure fn zero <T:Copy NumCast>() -> Quat<T> {
pub pure fn zero<T:Copy NumCast>() -> Quat<T> {
let _0 = cast(0);
Quat::new(_0, _0, _0, _0)
}
#[inline(always)]
pub pure fn identity <T:Copy NumCast>() -> Quat<T> {
pub pure fn identity<T:Copy NumCast>() -> Quat<T> {
let _0 = cast(0);
Quat::new(cast(1), _0, _0, _0)
}

View file

@ -56,13 +56,13 @@ pub trait GeometricVector<T> {
}
pub trait Vector2<T> {
// pub static pure fn new(x: T, y: T) -> self;
// pub static pure fn from_value(value: T) -> self;
// static pure fn new(x: T, y: T) -> self;
// static pure fn from_value(value: T) -> self;
}
pub trait Vector3<T> {
// pub static pure fn new(x: T, y: T, z: T) -> self;
// pub static pure fn from_value(value: T) -> self;
// static pure fn new(x: T, y: T, z: T) -> self;
// static pure fn from_value(value: T) -> self;
fn cross(other: &self) -> self;
}