--- a/Interval.st Wed Jun 24 15:30:08 2015 +0200
+++ b/Interval.st Thu Jun 25 18:31:31 2015 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -11,6 +13,8 @@
"
"{ Package: 'stx:libbasic' }"
+"{ NameSpace: Smalltalk }"
+
ReadOnlySequenceableCollection subclass:#Interval
instanceVariableNames:'start stop step'
classVariableNames:''
@@ -535,12 +539,12 @@
(start < stop) ifTrue:[
^ 0
].
- ^ stop - start // step + 1
+ ^ (start - stop) // step abs + 1
].
(stop < start) ifTrue:[
^ 0
].
- ^ stop - start // step + 1
+ ^ (stop - start) // step + 1
! !
!Interval methodsFor:'set operations'!
@@ -690,10 +694,10 @@
!Interval class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.57 2014-07-10 12:23:57 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.57 2014-07-10 12:23:57 cg Exp $'
+ ^ '$Header$'
! !