Alpha Engine: AEUtil.h File Reference

AlphaEngine

AEUtil.h File Reference

Header file for the utility library. More...

Go to the source code of this file.

Macros

#define isZero(x)   ((x < EPSILON) && (x > -EPSILON))
 
#define isEqual(x, y)   (((x >= y) ? (x-y) : (y-x)) < EPSILON)
 

Functions

f64 AEGetTime (f64 *pTime)
 Get the current time in seconds. More...
 
f32 AERandFloat ()
 Get a random real number between 0.0f to 1.0f. More...
 
s8ReadFromFile (const s8 *fileName)
 Read file into memory. More...
 

Detailed Description

Header file for the utility library.

Project: Alpha Engine
Author
Sun Tjen Fam
Date
February 02, 2008
Copyright
Copyright (C) 2013 DigiPen Institute of Technology. Reproduction or disclosure of this file or its contents without the prior written consent of DigiPen Institute of Technology is prohibited.

Definition in file AEUtil.h.

Macro Definition Documentation

#define isEqual (   x,
 
)    (((x >= y) ? (x-y) : (y-x)) < EPSILON)

Definition at line 56 of file AEUtil.h.

#define isZero (   x)    ((x < EPSILON) && (x > -EPSILON))

Definition at line 54 of file AEUtil.h.

Function Documentation

f64 AEGetTime ( f64 pTime)

Get the current time in seconds.

Parameters
[out]pTimePointer to f64 to store the current time. May be left null if not needed.
Return values
f64Returns the current time in seconds.
f32 AERandFloat ( )

Get a random real number between 0.0f to 1.0f.

Return values
f32Returns a random real number between 0.0f to 1.0f.
s8 * ReadFromFile ( const s8 fileName)

Read file into memory.

Open a file named filename, allocate sufficient storage and read the file into memory.

Warning
User must delete the memory allocated on their own.
Parameters
[in]fileNamePointer to the name of the file.
Return values
s8*Pointer to the start of the memory containing the file.
Generated on Sat Jan 4 2014 02:06:22 for Alpha Engine by   doxygen 1.8.5