Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 12 Nov 2002 18:09:28 -0000 1.20 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 30 Nov 2002 17:23:55 -0000 1.21 @@ -2772,6 +2772,22 @@ } } +ad_proc -public min { args } { + Returns the minimum of a list of numbers. Example: min 2 3 1.5 returns 1.5. + + @author Ken Mayer (kmayer@bitwrangler.com) + @creation-date 26 September 2002 +} { + set min [lindex $args 0] + foreach arg $args { + if { $arg < $min } { + set min $arg + } + } + return $min +} + + ad_proc -public max { args } { Returns the maximum of a list of numbers. Example: max 2 3 1.5 returns 3.