Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: assigning the maximum of two numbers

by kirbyk (Friar)
on Nov 02, 2005 at 22:56 UTC ( #505165=note: print w/ replies, xml ) Need Help??


in reply to assigning the maximum of two numbers

Edit: Sorry, I misread the question entirely.

I would probably go with the ternary for readability in most cases, but if you're doing this in a critical part of your application, it looks like sort/shift is optimized well. Neat.
  • Comment on Re: assigning the maximum of two numbers

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://505165]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2016-06-25 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (323 votes). Check out past polls.