[Issue 10039] New: std.algorithm enhancements: min, max, clamp
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 7 11:57:52 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10039
Summary: std.algorithm enhancements: min, max, clamp
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: diggsey at googlemail.com
--- Comment #0 from Diggory <diggsey at googlemail.com> 2013-05-07 11:57:51 PDT ---
Since min/max are supposed to be variadic they should also accept a single
parameter.
min(var) == var
max(var) == var
Also a natural extension of min/max is clamp:
clamp(a, b, var) == max(a, min(b, var))
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list