ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? U:RDoc::AnyMethod[iI" step:ETI"Numeric#step;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"QGenerates a sequence of numbers; with a block given, traverses the sequence.;To:RDoc::Markup::BlankLineo; ; [I"/Of the Core and Standard Library classes, ;TI":Integer, Float, and Rational use this implementation.;T@o; ; [I"A quick example:;T@o:RDoc::Markup::Verbatim; [I"squares = [] ;TI"41.step(by: 2, to: 10) {|i| squares.push(i*i) } ;TI"%squares # => [1, 9, 25, 49, 81] ;T: @format0o; ; [I"The generated sequence:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"Begins with +self+.;To;;0; [o; ; [I"that is, less than or equal to +to+ if +by+ is positive, ;TI"8greater than or equal to +to+ if +by+ is negative. ;TI":If +to+ is +nil+, the sequence is of infinite length.;T@o; ; [I"LIf a block is given, calls the block with each number in the sequence; ;TI"Ureturns +self+. If no block is given, returns an Enumerator::ArithmeticSequence.;T@o; ; [I"Keyword Arguments;T@o; ; [I"+With keyword arguments +by+ and +to+, ;TI"=their values (or defaults) determine the step and limit:;T@o; ; ["I"# Both keywords given. ;TI"squares = [] ;TI">4.step(by: 2, to: 10) {|i| squares.push(i*i) } # => 4 ;TI"$squares # => [16, 36, 64, 100] ;TI"cubes = [] ;TI">3.step(by: -1.5, to: -3) {|i| cubes.push(i*i*i) } # => 3 ;TI"4cubes # => [27.0, 3.375, 0.0, -3.375, -27.0] ;TI"squares = [] ;TI"91.2.step(by: 0.2, to: 2.0) {|f| squares.push(f*f) } ;TI"Lsquares # => [1.44, 1.9599999999999997, 2.5600000000000005, 3.24, 4.0] ;TI" ;TI"squares = [] ;TI"CRational(6/5).step(by: 0.2, to: 2.0) {|r| squares.push(r*r) } ;TI"Qsquares # => [1.0, 1.44, 1.9599999999999997, 2.5600000000000005, 3.24, 4.0] ;TI" ;TI"# Only keyword to given. ;TI"squares = [] ;TI">4.step(to: 10) {|i| squares.push(i*i) } # => 4 ;TI"0squares # => [16, 25, 36, 49, 64, 81, 100] ;TI"# Only by given. ;TI" ;TI"# Only keyword by given ;TI"squares = [] ;TI"<4.step(by:2) {|i| squares.push(i*i); break if i > 10 } ;TI")squares # => [16, 36, 64, 100, 144] ;TI" ;TI"# No block given. ;TI"Be = 3.step(by: -1.5, to: -3) # => (3.step(by: -1.5, to: -3)) ;TI"Fe.class # => Enumerator::ArithmeticSequence ;T; 0o; ; [I" Positional Arguments;T@o; ; [I"7With optional positional arguments +to+ and +by+, ;TI"=their values (or defaults) determine the step and limit:;T@o; ; [I"squares = [] ;TI"64.step(10, 2) {|i| squares.push(i*i) } # => 4 ;TI"$squares # => [16, 36, 64, 100] ;TI"squares = [] ;TI")4.step(10) {|i| squares.push(i*i) } ;TI"0squares # => [16, 25, 36, 49, 64, 81, 100] ;TI"squares = [] ;TI"@4.step {|i| squares.push(i*i); break if i > 10 } # => nil ;TI"5squares # => [16, 25, 36, 49, 64, 81, 100, 121] ;T; 0o; ; [I" Implementation Notes;T@o; ; [I"KIf all the arguments are integers, the loop operates using an integer ;TI" counter.;T@o; ; [ I"KIf any of the arguments are floating point numbers, all are converted ;TI")to floats, and the loop is executed ;TI"3floor(n + n*Float::EPSILON) + 1 times, ;TI"*where n = (limit - self)/step.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"pstep(to = nil, by = 1) {|n| ... } -> self step(to = nil, by = 1) -> enumerator step(to = nil, by: 1) {|n| ... } -> self step(to = nil, by: 1) -> enumerator step(by: 1, to: ) {|n| ... } -> self step(by: 1, to: ) -> enumerator step(by: , to: nil) {|n| ... } -> self step(by: , to: nil) -> enumerator ;T0[I" (*args);T@{FI" Numeric;TcRDoc::NormalClass00