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.19 -r1.19.2.1 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 24 Sep 2002 19:34:53 -0000 1.19 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 1 Oct 2002 06:17:32 -0000 1.19.2.1 @@ -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.