diff options
author | pspjuth <peter.spjuth@gmail.com> | 2017-11-19 18:40:13 (GMT) |
---|---|---|
committer | pspjuth <peter.spjuth@gmail.com> | 2017-11-19 18:40:13 (GMT) |
commit | c2eeda3f09a8b05e10e5f8f968fc28bb2dcf3750 (patch) | |
tree | d6f7998577c10c0605efb46129ae1ce9df1f2bd1 /library | |
parent | b44ffcf5e24b13f5fd302449456cacaf4b9cb92e (diff) | |
download | tcl-c2eeda3f09a8b05e10e5f8f968fc28bb2dcf3750.zip tcl-c2eeda3f09a8b05e10e5f8f968fc28bb2dcf3750.tar.gz tcl-c2eeda3f09a8b05e10e5f8f968fc28bb2dcf3750.tar.bz2 |
Changed math functions min and max to C implementations.
Diffstat (limited to 'library')
-rw-r--r-- | library/init.tcl | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/library/init.tcl b/library/init.tcl index c31eea3..d5beb69 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -73,43 +73,6 @@ namespace eval tcl { encoding dirs $Path } } - - # TIP #255 min and max functions - namespace eval mathfunc { - proc min {args} { - if {![llength $args]} { - return -code error \ - "too few arguments to math function \"min\"" - } - set val Inf - foreach arg $args { - # This will handle forcing the numeric value without - # ruining the internal type of a numeric object - if {[catch {expr {double($arg)}} err]} { - return -code error $err - } - if {$arg < $val} {set val $arg} - } - return $val - } - proc max {args} { - if {![llength $args]} { - return -code error \ - "too few arguments to math function \"max\"" - } - set val -Inf - foreach arg $args { - # This will handle forcing the numeric value without - # ruining the internal type of a numeric object - if {[catch {expr {double($arg)}} err]} { - return -code error $err - } - if {$arg > $val} {set val $arg} - } - return $val - } - namespace export min max - } } # Windows specific end of initialization |