| 
 | 
#include <stdio.h>
#include <stdlib.h>
#include <stdexcept>
Include dependency graph for standard.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
| Defines | |
| #define | MTRACE 1 ? (void)0 : ::printDebugString | 
| #define | __LINE ( __LINE__ ) | 
| #define | __GETLINE(x) "(" #x ")" | 
| #define | GETLINE __GETLINE __LINE | 
| #define | TODO(y) message ( __FILE__ GETLINE " : " #y " " ) | 
| #define | CLAMP_MINMAX(_val, _min, _max) (_val>_max)?(_val=_max):((_val<_min)?(_val=_min):(_val)) | 
| Clamp _val so that _min <= _val <= _max. | |
| #define | ROUND(x) ((int)floor(x+0.5)) | 
| Rounds x to the nearest whole number. | |
| #define | NOMINMAX | 
| #define | MAX(a, b) (((a) > (b)) ? (a) : (b)) | 
| #define | MIN(a, b) (((a) < (b)) ? (a) : (b)) | 
| #define | RESCALE(x, lowerOld, upperOld, lowerNew, upperNew) ((double)lowerNew + ((double)upperNew - (double)lowerNew) * ((double)x - (double)lowerOld) / ((double)upperOld - (double)lowerOld)) | 
| Rescales a value from one lower/upper bound to another. Could be used to convert fahrenheit to celsius, for example. | |
| #define | M_PI 3.14159265358979323846 | 
| #define | LERP(t, a, b) ( a + (b - a) * t ) | 
| Functions | |
| void | Message (const char *format,...) | 
| MessageBox on steroids. | |
| char * | fmtString (const char *format,...) | 
| void | printDebugString (const char *format,...) | 
| Prints a formatted string to the debugging window. | |
| std::exception | Error (const char *format,...) | 
| Throw a formatted exception. | |
| std::invalid_argument | ArgError (const char *format,...) | 
| Throw a formatted exception (std::invalid_argument). | |
| std::logic_error | LogicError (const char *format,...) | 
| Throw a formatted exception (std::logic_error). | |
| std::runtime_error | RuntimeError (const char *format,...) | 
| Throw a formatted exception (std::runtime_error). | |
| std::exception | DiskError (const char *format,...) | 
| Throw a formatted exception (std::exception). | |
| std::exception | DiskError (FILE *f, const char *format,...) | 
| Throw a formatted exception (std::exception). | |
Author: Matt Loper
Definition in file standard.h.
 1.2.15
1.2.15