[ADD] main character,
smoke particle when shooting, fire effect to player
This commit is contained in:
9
src/toolbox/toolbox.c
Normal file
9
src/toolbox/toolbox.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "toolbox.h"
|
||||
|
||||
float toolbox_random_float(float a, float b)
|
||||
{
|
||||
float random = ((float)rand()) / (float)RAND_MAX;
|
||||
float diff = b - a;
|
||||
float r = random * diff;
|
||||
return a + r;
|
||||
}
|
||||
13
src/toolbox/toolbox.h
Normal file
13
src/toolbox/toolbox.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef TOOLBOX_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/**
|
||||
* @brief generates a random float between the given floats
|
||||
*
|
||||
* @param a the minumum value (inclusive)
|
||||
* @param b the maximum value (inclusive)
|
||||
*/
|
||||
float toolbox_random_float(float a, float b);
|
||||
|
||||
#endif // !TOOLBOX_H
|
||||
Reference in New Issue
Block a user