Merge branch 'develop' into feature/MovementCharacter

This commit is contained in:
SemvdH
2021-06-11 10:14:12 +02:00
committed by GitHub
36 changed files with 6346 additions and 4698 deletions

View File

@@ -1,3 +1,4 @@
#include <ctime>
#include "toolbox.h"
namespace toolbox
@@ -43,5 +44,16 @@ namespace toolbox
final.y = Lerp(from.y, to.y, amount);
final.z = Lerp(from.z, to.z, amount);
return final;
}
int Random(const int min, const int max)
{
static bool first = true;
if (first)
{
srand(time(0));
first = false;
}
return min + rand() % ((max + 1) - min);
}
}

View File

@@ -68,4 +68,14 @@ namespace toolbox
* @return position of where to go
*/
glm::vec3 Lerp(glm::vec3 from, glm::vec3 to, float amount);
/*
* @brief: This function will return a value between min and max
*
* @param min: The min value
* @param max: The max value
*
* @return: The random number
*/
int Random(const int min, const int max);
}