another simple maths question

Blitz3D Forums/Blitz3D Programming/another simple maths question

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hey peeps

Every frame, im moving an entity in a certain direction by speed "speed"...
Im also storing how much it moved by last time, to add a drifting effect (whats it called?)

Now, im having a problem when detecting my object has reached its target: without the drift stuff, i can just go

if entitydistance(object,target)<speed then reached=1

but, How do i do it including the old forces?

Basically, i need to figure out:

nspeed=0
for o=1 to 10
nspeed=nspeed+speed
speed=speed*.9
next
print speed


by maths. i know this is only aproximate but itl be enough... if you know of a better way, post also? :D

cheers peeps.