February 16, 2011 intrinsic min and max for ints | ||||
---|---|---|---|---|
| ||||
Hello, Is there a library function for min/max for integers. I would rather not use the ?-operator, it's rather clumsy. I looked in the standard lib and only found f(min|max). Thank you, Dominic Jones |
February 16, 2011 Re: intrinsic min and max for ints | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dominic Jones | Am 16.02.2011 10:54, schrieb Dominic Jones:
> Hello,
>
> Is there a library function for min/max for integers. I would rather not use
> the ?-operator, it's rather clumsy. I looked in the standard lib and only
> found f(min|max).
>
> Thank you,
> Dominic Jones
They're in 'std.algorithm'. They work for all types a, b where a < b is defined so also for ints.
Mafi
|
Copyright © 1999-2021 by the D Language Foundation