Skip to content
Snippets Groups Projects
Commit 1210a28e authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

Add missing namespace.

parent ce8ab6da
No related branches found
No related tags found
No related merge requests found
......@@ -10,11 +10,13 @@
#define F32_CONSTANT(x) float(x)
#endif
namespace xpu {
XPU_D constexpr float pi() { return F32_CONSTANT(M_PI); }
XPU_D constexpr float pi_2() { return F32_CONSTANT(M_PI_2); }
XPU_D constexpr float pi_4() { return F32_CONSTANT(M_PI_4); }
XPU_D constexpr float deg_to_rad() { return pi() / 180.f; }
XPU_D constexpr float sqrt2() { return F32_CONSTANT(M_SQRT2); }
} // namespace xpu
#undef F32_CONSTANT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment