www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How do you get the min / max of two numbers a, b?

reply Enjoys Math <enjoysmath gmail.com> writes:
I know there's fmax for floats, but what about ints?

Thanks.
Sep 18 2015
next sibling parent Enjoys Math <enjoysmath gmail.com> writes:
On Saturday, 19 September 2015 at 03:53:12 UTC, Enjoys Math wrote:
 I know there's fmax for floats, but what about ints?

 Thanks.
I see: http://dlang.org/phobos/std_algorithm_comparison.html#max
Sep 18 2015
prev sibling parent ponce <contact gam3sfrommars.fr> writes:
On Saturday, 19 September 2015 at 03:53:12 UTC, Enjoys Math wrote:
 I know there's fmax for floats, but what about ints?

 Thanks.
http://p0nce.github.io/d-idioms/#Minimum-or-maximum-of-numbers
Sep 19 2015