Skip to content

Commit a9dea39

Browse files
committed
Remove pessimation of .round($x)
Also using a literal param in MMD, which is still not optimized away.
1 parent 45bac9b commit a9dea39

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/core/Int.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ my class Int does Real { # declared in BOOTSTRAP
6969
method ceiling(Int:D:) { self }
7070
proto method round(|) {*}
7171
multi method round(Int:D:) { self }
72-
multi method round(Int:D: 1) { self }
7372
multi method round(Int:D: $scale as Real) { (self / $scale + 1/2).floor * $scale }
7473

7574
method lsb(Int:D:) {

src/core/Real.pm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ my role Real does Numeric {
4343
multi method round(Real:D:) {
4444
(self + 1/2).floor; # Rat NYI here, so no .5
4545
}
46-
multi method round(Real:D: 1) {
47-
(self + 1/2).floor;
48-
}
4946
multi method round(Real:D: $scale as Real) {
5047
(self / $scale + 1/2).floor * $scale;
5148
}

0 commit comments

Comments
 (0)