Integer.st
changeset 5238 f7a816a660a3
parent 5210 f56e448396f9
child 5435 ad6612cc6848
equal deleted inserted replaced
5237:ac92ad320972 5238:f7a816a660a3
  1200 
  1200 
  1201     "Created: / 25.10.1998 / 14:58:09 / cg"
  1201     "Created: / 25.10.1998 / 14:58:09 / cg"
  1202     "Modified: / 25.10.1998 / 19:20:33 / cg"
  1202     "Modified: / 25.10.1998 / 19:20:33 / cg"
  1203 ! !
  1203 ! !
  1204 
  1204 
  1205 !Integer methodsFor:'coercing and converting'!
  1205 !Integer methodsFor:'coercing & converting'!
  1206 
  1206 
  1207 asFixedPoint
  1207 asFixedPoint
  1208     "return the receiver as a fixedPoint number"
  1208     "return the receiver as a fixedPoint number"
  1209 
  1209 
  1210     ^ FixedPoint numerator:self denominator:1 scale:1
  1210     ^ FixedPoint numerator:self denominator:1 scale:1
  2505 
  2505 
  2506     "Created: / 3.5.1999 / 10:02:39 / stefan"
  2506     "Created: / 3.5.1999 / 10:02:39 / stefan"
  2507     "Modified: / 3.5.1999 / 14:30:49 / stefan"
  2507     "Modified: / 3.5.1999 / 14:30:49 / stefan"
  2508 ! !
  2508 ! !
  2509 
  2509 
  2510 !Integer::ModuloNumber methodsFor:'arithmethic'!
  2510 !Integer::ModuloNumber methodsFor:'arithmetic'!
  2511 
  2511 
  2512 modulusOf:aNumber
  2512 modulusOf:aNumber
  2513     "compute the aNumber modulo myself.
  2513     "compute the aNumber modulo myself.
  2514      The shortcut works only, if aNumber is < modulo * modulo
  2514      The shortcut works only, if aNumber is < modulo * modulo
  2515      (When doing arithmethic modulo something).
  2515      (When doing arithmethic modulo something).
  2585 ! !
  2585 ! !
  2586 
  2586 
  2587 !Integer class methodsFor:'documentation'!
  2587 !Integer class methodsFor:'documentation'!
  2588 
  2588 
  2589 version
  2589 version
  2590     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.129 2000-01-25 10:52:51 cg Exp $'
  2590     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.130 2000-02-07 11:29:02 cg Exp $'
  2591 ! !
  2591 ! !
  2592 Integer initialize!
  2592 Integer initialize!