useful macros
- From: Malcolm McLean <malcolm.mclean5@xxxxxxxxxxxxxx>
- Date: Sat, 26 May 2012 13:08:12 -0700 (PDT)
I find I use these all the time.
uniform() - generate a random number on 0 - 1.0 minus epsilon
lerp() - linearly interpolate between a and b by t.
clamp() - force x to the range low to high.
Anyone got any more?
--
Basic Algorithms - a fantastic C resource
http://www.malcolmmclean.site11.com/www
.
- Follow-Ups:
- Re: useful macros
- From: winndy
- Re: useful macros
- Prev by Date: Re: Void variables
- Next by Date: Re: Code to automatically write C get/set functions from a set of typedef structs?
- Previous by thread: Re: Recommendation for a text
- Next by thread: Re: useful macros
- Index(es):
Relevant Pages
|