NumberRange class in LotusScript

Todd Harris kindly told me of an error in the constructor, thanks! The attached code has been updated accordingly!

The NumberRange class makes finding overlaps and inclusions of a range of numbers easy. Use it like this:

Dim range1 As New NumberRange(12, 25)

Dim range2 As New NumberRange(20, 500)

Dim range3 As New NumberRange(13, 15)

Print range1.includesNumber(13) ‘ Will be true

Print range1.overlaps(range2) ‘ Will be true

Print range3.includesRange(range1) ‘ Will be true

Print range3.includesNumber(10) ‘ Will be false

Print range2.overlaps(range3) ‘ Will be false

Print range1.includesRange(range2) ‘ Will be false