2 docSlot("isInASequenceSet", "Return true if receiver is in one of the Sequence sequenceSets, otherwise false.")
3 isInASequenceSet
:= method(
4 Sequence sequenceSets
foreach(set
,
5 if(in(set
), return true
)
10 docSlot("constants", "Object containing number constants e, inf, nan and pi.")
12 constants
:= Object clone do(
13 docSlot("nan", "Returns a infinity constant.")
16 docSlot("inf", "Returns a not-a-number constant.")
19 docSlot("e", "Returns the constant e.")
20 e
:= 2.71828182845904523536028747135266249
22 docSlot("pi", "Returns the constant pi.")
23 pi
:= 3.14159265358979323846264338327950288
26 asSimpleString
:= method(self asString
)
28 docSlot("asHex", "Returns the number as hex digits inside a string. 97 asHex -> \"61\"")
29 asHex
:= method(self asString
toBase(16))
31 docSlot("asBinary", "Returns the number as binary digits inside a string. 42 asBinary -> \"101010\"")
32 asBinary
:= method(self asString
toBase(2))
34 docSlot("asOctal", "Returns the number as octal digits inside a string. 436 asOctal -> \"664\"")
35 asOctal
:= method(self asString
toBase(8))
37 docSlot("combinations(size)", "Returns the combinations where the receiver is the number of different objects and size is the number to be arranged.")
38 combinations
:= method(r
, self factorial
/(r factorial
*((self - r
) factorial
)))
40 docSlot("permutations(size)", "Returns the permutations where the receiver is the number of different objects and size is the number to be arranged.")
41 permutations
:= method(r
, self factorial
/((self - r
) factorial
))
43 docSlot("minMax(low, high)", "Returns a number between or equal to low and high. If the receiver is equal to or between low and high, the reciever is returned. If the reciever is less than low, low is returned. If the receiver is greater than high, high is returned.")
44 minMax
:= method(low
, high
, min(high
) max(low
))