Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
core.internal.util.math
Internal math utilities.
License:
Authors:
Luís Ferreira
Source core/internal/util/math.d
- pure nothrow @nogc @safe T
max(T)(Ta, Tb); - Calculates the maximum of the passed argumentsParameters:
T afirst value to select the maximum from T bsecond value to select the maximum from Returns:The maximum of the passed-in values. - pure nothrow @nogc @safe T
min(T)(Ta, Tb); - Calculates the minimum of the passed argumentsParameters:
T afirst value to select the minimum from T bsecond value to select the minimum from Returns:The minimum of the passed-in values.Examples:assert(max(1,3) == 3); assert(max(3,1) == 3); assert(max(1,1) == 1);
Examples:assert(min(1,3) == 1); assert(min(3,1) == 1); assert(min(1,1) == 1);
Copyright © 1999-2026 by the D Language Foundation | Page generated by
Ddoc on Wed Aug 5 15:38:59 2026