2012-12-13 14:55:08 -08:00
|
|
|
pub mod num {
|
|
|
|
pub trait Num2 {
|
2013-03-22 11:23:21 -07:00
|
|
|
fn from_int2(n: int) -> Self;
|
2012-12-13 14:55:08 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-26 02:26:09 -04:00
|
|
|
pub mod f64 {
|
|
|
|
impl ::num::Num2 for f64 {
|
|
|
|
fn from_int2(n: int) -> f64 { return n as f64; }
|
2012-12-13 14:55:08 -08:00
|
|
|
}
|
2012-12-28 17:17:05 -08:00
|
|
|
}
|