Re: Formula for Damping f times

Fabian Giesen <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
> Hi,
> This is a semi-trivial but I can't quite remember the answer, even
> though I've done it before.
> 
> I have an update function sort of like this..
> 
> void updateX( float deltaTime)
> {
> 	x = x*k;
> }
> 
> k is a constant less than 1.0.
> 
> Now to do the damping properly I need to perform "x=x*k" deltaTime
> times, where deltaTime is a fraction.
> 
> Can anyone help with this please? I recall it just being a log or
> something.

x *= pow(k,deltaTime);

Kind regards,
-Fabian Giesen

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.