summaryrefslogtreecommitdiff
path: root/shared_cpp/mathlib.cpp
blob: 8222d001da53e7e6eac1e4ca0cc61201f23b1dc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include "mathlib.h"
#include <cstdlib>

Vector2 getRandomNormalVector2() {
    Vector2 retval = {
		static_cast<float>(rand()) / static_cast<float>(RAND_MAX),
		static_cast<float>(rand()) / static_cast<float>(RAND_MAX) 
	};

	return retval.normalize();
}