On 15 Nov 2009, at 00:42, Marnen Laibow-Koser wrote:
> Eleanor McHugh wrote:
>> On 14 Nov 2009, at 23:40, Marnen Laibow-Koser wrote:
>>> It should be fairly clear from the formulae.  One thing that bears
>>> repeating, though: never use the default floating-point numbers for
>>> math; they're simply not precise enough.  Use integers or  
>>> BigDecimal.
>>
>>
>> That rather depends on the required level of precision...
>>
>
> Well, error accumulates pretty quickly in IEEE 754 floats, and
> trajectories require lots of calculation.  I wouldn't trust floats  
> in a
> situation like that -- would you?

In a hardcore physics simulation with many forces then no I wouldn't,  
but in a simple game then yes I'd probably go with floating-point :)


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason