32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
/* /\ +--------------------------------------------------------------+
|
|
____/ \____ /| - zlib/MIT/Unlicenced game framework licensed to freely use, |
|
|
\ / / | copy, modify and sell without restriction |
|
|
+--\ ^__^ /--+ | |
|
|
| ~/ \~ | | - originally created at [http://nugget.fun] |
|
|
| ~~~~~~~~~~~~ | +--------------------------------------------------------------+
|
|
| SPACE ~~~~~ | /
|
|
| ~~~~~~~ BOX |/
|
|
+--------------+
|
|
|
|
[math.hpp]
|
|
|
|
For math helper functions that require only GLM primitives.
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/* GLM */
|
|
#define GLM_ENABLE_EXPERIMENTAL
|
|
#include <glm/glm.hpp>
|
|
#include <glm/gtx/compatibility.hpp>
|
|
|
|
namespace sb
|
|
{
|
|
/* Convert a vector described by the given angle and magnitude to an X and Y offset vector. */
|
|
glm::vec2 velocity_to_delta(float, float);
|
|
|
|
/* Convert a vector containing angle and magnitude to an X and Y offset vector. */
|
|
glm::vec2 velocity_to_delta(glm::vec2);
|
|
}
|