514 "return the quotient of the receiver and the argument" |
515 "return the quotient of the receiver and the argument" |
515 |
516 |
516 ^ self subclassResponsibility |
517 ^ self subclassResponsibility |
517 ! |
518 ! |
518 |
519 |
519 // something |
520 // aNumber |
520 "return the integer quotient of dividing the receiver by aNumber with |
521 "return the integer quotient of dividing the receiver by aNumber with |
521 truncation towards negative infinity. |
522 truncation towards negative infinity. |
522 |
523 |
523 Please be aware of the effect of truncation on negative receivers, |
524 Please be aware of the effect of truncation on negative receivers, |
524 and understand the difference between '//' vs. 'quo:' |
525 and understand the difference between '//' vs. 'quo:' |
525 and the corresponding '\\' vs. 'rem:'" |
526 and the corresponding '\\' vs. 'rem:'" |
526 |
527 |
527 "/ Note: '^ (self / something) floor' may lead to infinite recursion |
528 "/ Note: '^ (self / aNumber) floor' may lead to infinite recursion |
528 |
529 |
529 ^ self subclassResponsibility |
530 ^ self subclassResponsibility |
530 |
531 |
531 "Modified: / 5.11.1996 / 11:46:27 / cg" |
532 "Modified: / 05-11-1996 / 11:46:27 / cg" |
532 "Modified: / 12.2.1998 / 16:31:36 / stefan" |
533 "Modified: / 12-02-1998 / 16:31:36 / stefan" |
|
534 "Modified (comment): / 16-11-2017 / 11:26:13 / mawalch" |
533 ! |
535 ! |
534 |
536 |
535 \\ something |
537 \\ something |
536 "return the receiver modulo something. |
538 "return the receiver modulo something. |
537 The remainder has the same sign as the argument, something. |
539 The remainder has the same sign as the argument, something. |