Nasal library: Difference between revisions

Jump to navigation Jump to search
Line 489: Line 489:
|text = Creates a vector of numbers starting from <code>start</code> (default 0) up to but not including <code>stop</code>, incremented by <code>step</code> (default 1). Note: To specify <code>step</code>, you must also provide <code>start</code>; otherwise the second argument is interpreted as <code>stop</code>.
|text = Creates a vector of numbers starting from <code>start</code> (default 0) up to but not including <code>stop</code>, incremented by <code>step</code> (default 1). Note: To specify <code>step</code>, you must also provide <code>start</code>; otherwise the second argument is interpreted as <code>stop</code>.
|param1 = start
|param1 = start
|param1text = Optional. The starting number of the sequence. Defaults to 0 if omitted.
|param1text = Optional. The starting number of the sequence. Defaults to 0 if omitted. Required if you want to specify <code>step</code>.
|param2 = stop
|param2 = stop
|param2text = Required. The number at which to stop the sequence (not included).
|param2text = Required. The number at which to stop the sequence (not included).
|param3 = step
|param3 = step
|param3text = Optional. The increment between each number in the sequence. Defaults to 1.
|param3text = Optional. The increment between each number in the sequence. Defaults to 1. Only valid if <code>start</code> is also specified.
|example1 =  
|example1 =  
var vec = range(5); # Creates a vector [0, 1, 2, 3, 4]
var vec = range(5); # Creates a vector [0, 1, 2, 3, 4]
Line 501: Line 501:
var vec = range(0, 1); # Creates a vector [0]
var vec = range(0, 1); # Creates a vector [0]
}}
}}


=== remove() ===
=== remove() ===
1,376

edits

Navigation menu