File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
branches/incoming/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 @@ -6,7 +6,7 @@ refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/incoming: 389125aeb83eb1571ff1ec4e5e140b1ac2109341
9
+ refs/heads/incoming: 73280b0472afdcf4df7eb1a80a7ac0b74a791ca9
10
10
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
11
11
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
12
12
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
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