git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80a615f
)
sc: round damage values
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 10 Jun 2015 20:54:12 +0000
(22:54 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 10 Jun 2015 23:40:32 +0000
(
01:40
+0200)
Avoid fractions for calculated values.
sc.plp
patch
|
blob
|
history
diff --git
a/sc.plp
b/sc.plp
index 44940e5a06bc88f21a884132e647c482321e83a2..8ce0ba7a0816ea7839933b7a664d0756608c15f9 100644
(file)
--- a/
sc.plp
+++ b/
sc.plp
@@
-200,8
+200,8
@@
sub showrange {
elsif ($type eq 'implosive') {
$min /= 4;
}
- $min = int($min + .5); # round halves up
}}
+ $_ = int($_ + .5) for $min, $max; # round halves up
return $min == $max ? $min : "$min-$max";
}