up to date 
HomeProjectsTagsMembersGroupsHelp

Fixed Decimals

OverviewWikiNewsVersionsLatest

Project Description

A FixedDecimal is similar to a ScaledDecimal, but different in certain select ways. It's primary purpose was to be able to represent precise decimals for such things as representing money - where ScaledDecimals leave something to be desired. For instance, with ScaledDecimals, you get: (33.333s withScale:2) + (33.333s withScale:2) print it yields 66.67s but with FixedDecimals, you would get: (33.333 asFixedDecimal: 2) + (33.333 asFixedDecimal: 2) print it yields 66.66. So, FixedDecimals round the numbers to the exact scale you specify - converting a float (or fraction) to a FixedDecimal and back will not necessarily return the starting number, unlike ScaledDecimals.

Members

Creator:Chris Cunningham
Admin:Chris Cunningham

License

Code commited to this repository will be automatically under MIT license.

Registration

MCHttpRepository
location: 'http://www.squeaksource.com/FixedDecimal'
user: ''
password: ''

Packages

  • FixedDecimal
  • FixedDecimal Tests

Links

http://www.squeaksource.com/FixedDecimal.html
http://www.squeaksource.com/FixedDecimal

Global:Read And Write

Statistics

Registered:31 August 2007 5:17:03 am
Total Releases:0
Total Versions:14
Total Downloads:815
XHTML | CSS | RSS4 August 2021