First time here? Check out the FAQ!
x

What does {-1 floatTo: 1 by: 0.125} do?

0 votes
77 views
I saw this Smalltalk in the example warpBy: as OutValues of IOCharacteristic and wondered how it is different to a regular (-1 to: 1 by 0.125) ?
asked Jan 21 in Capytalk & Smalltalk by cristian-vogel (Master) (8,410 points)

1 Answer

0 votes

to:by: can sometimes leave off the final number due to Floating point precision limits. We created floatTo:by: to solve that problem.

 

answered Jan 28 by ssc (Savant) (127,080 points)
...