File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
branches/auto/src/libcore/num Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: 389125aeb83eb1571ff1ec4e5e140b1ac2109341
17
+ refs/heads/auto: 73280b0472afdcf4df7eb1a80a7ac0b74a791ca9
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ pub trait One {
39
39
static pure fn one( ) -> Self ;
40
40
}
41
41
42
+ pub pure fn abs < T : cmp:: Ord Num Zero > ( v : T ) -> T {
43
+ if v < Zero :: zero ( ) { v. neg ( ) } else { v }
44
+ }
45
+
42
46
pub trait Round {
43
47
pure fn round ( & self , mode : RoundMode ) -> Self ;
44
48
You can’t perform that action at this time.
0 commit comments