equal
deleted
inserted
replaced
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
12 |
13 ArithmeticValue subclass:#Number |
13 ArithmeticValue subclass:#Number |
14 instanceVariableNames:'' |
14 instanceVariableNames:'' |
15 classVariableNames:'' |
15 classVariableNames:'' |
16 poolDictionaries:'' |
16 poolDictionaries:'' |
17 category:'Magnitude-Numbers' |
17 category:'Magnitude-Numbers' |
18 ! |
18 ! |
19 |
19 |
20 !Number class methodsFor:'documentation'! |
20 !Number class methodsFor:'documentation'! |
21 |
21 |
22 copyright |
22 copyright |
581 ^ self = 0 |
581 ^ self = 0 |
582 |
582 |
583 "Modified: 18.7.1996 / 12:40:49 / cg" |
583 "Modified: 18.7.1996 / 12:40:49 / cg" |
584 ! ! |
584 ! ! |
585 |
585 |
|
586 !Number methodsFor:'truncation and rounding'! |
|
587 |
|
588 fractionPart |
|
589 "return a float with value from digits after the decimal point. |
|
590 (i.e. the receiver minus its truncated value)" |
|
591 |
|
592 ^ self - self truncated asFloat |
|
593 |
|
594 " |
|
595 1234.56789 fractionPart |
|
596 1.2345e6 fractionPart |
|
597 " |
|
598 |
|
599 "Modified: / 4.11.1996 / 20:26:54 / cg" |
|
600 "Created: / 28.10.1998 / 17:14:40 / cg" |
|
601 ! |
|
602 |
|
603 integerPart |
|
604 "return a float with value from digits before the decimal point |
|
605 (i.e. the truncated value)" |
|
606 |
|
607 ^ self truncated asFloat |
|
608 |
|
609 " |
|
610 1234.56789 integerPart |
|
611 1.2345e6 integerPart |
|
612 " |
|
613 |
|
614 "Modified: / 4.11.1996 / 20:26:21 / cg" |
|
615 "Created: / 28.10.1998 / 17:14:56 / cg" |
|
616 ! ! |
|
617 |
586 !Number class methodsFor:'documentation'! |
618 !Number class methodsFor:'documentation'! |
587 |
619 |
588 version |
620 version |
589 ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.47 1998-08-19 10:54:40 tm Exp $' |
621 ^ '$Header: /cvs/stx/stx/libbasic/Number.st,v 1.48 1998-10-28 16:19:13 cg Exp $' |
590 ! ! |
622 ! ! |