Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #ifndef _OF_MATH_H
00014 #define _OF_MATH_H
00015 
00016 
00017 #include "ofConstants.h"
00018 
00019 int             ofNextPow2 ( int a );
00020 void            ofSeedRandom();
00021 void            ofSeedRandom(int val);
00022 float           ofRandom(float val0, float val1);               
00023 float           ofRandomf();                                                    
00024 float           ofRandomuf();                                                   
00025 
00026 float           ofNormalize(float value, float min, float max);
00027 float           ofMap(float value, float inputMin, float inputMax, float outputMin, float outputMax);
00028 float           ofClamp(float value, float min, float max);
00029 float           ofLerp(float start, float stop, float amt);
00030 float           ofDist(float x1, float y1, float x2, float y2);
00031 float           ofDistSquared(float x1, float y1, float x2, float y2);
00032 int                     ofSign(float n);
00033 bool            ofInRange(float t, float min, float max);
00034 float           ofRadToDeg(float radians);
00035 float           ofDegToRad(float degrees);
00036 float           ofRandomWidth();
00037 float           ofRandomHeight();
00038 
00039 #endif