Intervals

Jarvis, Robert P. Jarvisb at timken.com
Tue Nov 30 14:03:31 UTC 1999


> -----Original Message-----
> From:	David N. Smith (IBM) [SMTP:dnsmith at watson.ibm.com]
> Sent:	Monday, November 29, 1999 5:12 PM
> To:	squeak at cs.uiuc.edu
> Subject:	RE: Intervals
> 
> At 13:14 -0500 11/29/99, Jarvis, Robert P. wrote:
> >The attached change set combines Andrew's changes with Dan's suggestions
> and
> >runs correctly for the test cases identified, as well as for negative
> >numbers, i.e.    ...SNIP...
> 
> Shouldn't that test on step compare it with ZERO? It fails miserably 
> when the step is 0.5.
> 
	<snip!>

<grunt>  &*@(*#~! Microsoft products... <grumble>

Outlook, in its infinite perversity/wisdom, decided to include my change set
at the very end of a message with a lot of quoted material (my own bad
habits surfacing), in spite of the fact that it showed up in the
more-or-less correct place when I was composing the message.  Anyway, here
it is again, in raw text form:

'From Squeak2.6 of 11 October 1999 [latest update: #1559] on 29 November
1999 at 12:52:16 pm'!

!Interval methodsFor: 'accessing' stamp: 'rpj 11/29/1999 11:46'!
includes: aNumber
	^(self rangeIncludes: aNumber) and: [ aNumber - self first \\ step =
0 ]! !

!Interval methodsFor: 'accessing' stamp: 'rpj 11/29/1999 11:39'!
rangeIncludes: aNumber
	^aNumber between: (self first min: self last) and: (self first max:
self last)! !

Bob Jarvis
Compuware @ Timken





More information about the Squeak-dev mailing list