about summary refs log tree commit diff
path: root/src/libcore/float.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/float.rs')
-rw-r--r--src/libcore/float.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/float.rs b/src/libcore/float.rs
index a2b5197277a..d55c0e0c371 100644
--- a/src/libcore/float.rs
+++ b/src/libcore/float.rs
@@ -416,6 +416,7 @@ impl num of num for float {
     fn mul(&&other: float)    -> float { ret self * other; }
     fn div(&&other: float)    -> float { ret self / other; }
     fn modulo(&&other: float) -> float { ret self % other; }
+    fn neg()                  -> float { ret -self;        }
 
     fn to_int()         -> int   { ret self as int; }
     fn from_int(n: int) -> float { ret n as float;  }