P is for Practical | |
PerlMonks |
Re^4: sub as mathematical functionby davido (Cardinal) |
on Sep 04, 2019 at 18:12 UTC ( [id://11105619]=note: print w/replies, xml ) | Need Help?? |
The subexpression 9*X/18 == (9x)/18 == x/2. Therefore, max(min(int($_ / 2), 8, 0); Dave
In Section
Seekers of Perl Wisdom
|
|