Introduce 'step' property in progressions instead of 'increment'
This commit is contained in:
@@ -24,7 +24,7 @@ fun ranges(): List<GenericFunction> {
|
||||
"return TProgression.fromClosedRange(last, first, -ONE)"
|
||||
}
|
||||
body(ProgressionsOfPrimitives) {
|
||||
"return TProgression.fromClosedRange(last, first, -increment)"
|
||||
"return TProgression.fromClosedRange(last, first, -step)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ fun ranges(): List<GenericFunction> {
|
||||
"return TProgression.fromClosedRange(last, first, -ONE)"
|
||||
}
|
||||
body(ProgressionsOfPrimitives) {
|
||||
"return TProgression.fromClosedRange(last, first, -increment)"
|
||||
"return TProgression.fromClosedRange(last, first, -step)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ fun ranges(): List<GenericFunction> {
|
||||
body(ProgressionsOfPrimitives) {
|
||||
"""
|
||||
checkStepIsPositive(step > 0, step)
|
||||
return TProgression.fromClosedRange(first, last, if (increment > 0) step else -step)
|
||||
return TProgression.fromClosedRange(first, last, if (this.step > 0) step else -step)
|
||||
"""
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ fun ranges(): List<GenericFunction> {
|
||||
body(ProgressionsOfPrimitives) {
|
||||
"""
|
||||
checkStepIsPositive(step > 0, step)
|
||||
return TProgression.fromClosedRange(first, last, if (increment > 0) step else -step)
|
||||
return TProgression.fromClosedRange(first, last, if (this.step > 0) step else -step)
|
||||
"""
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ fun ranges(): List<GenericFunction> {
|
||||
|
||||
doc {
|
||||
"""
|
||||
Returns a progression from this value down to the specified [to] value with the increment -1.
|
||||
Returns a progression from this value down to the specified [to] value with the step -1.
|
||||
The [to] value has to be less than this value.
|
||||
"""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user