TABLE OF CONTENTS


::pwtk::intSeq

SYNOPSIS

proc ::pwtk::intSeq {from to nsteps} {

USAGE

   ::pwtk::intSeq from to nsteps

PURPOSE

Return an as equispaced as possible sequence of 'nsteps' integer numbers in the [from,to] range.

ARGUMENTS

SOURCE

    set d [expr double($to - $from) / double($nsteps - 1)]
    if { $nsteps <= 0 } { return [expr round($from)] }
    for {set i 0} {$i < $nsteps} {incr i} {
        lappend result [expr round($from + $i*$d)]
    }
    return $result
}