blah/src/math/circle.cpp

11 lines
253 B
C++
Raw Normal View History

2020-08-26 15:38:01 +08:00
#include <blah/math/circle.h>
#include <blah/math/calc.h>
using namespace Blah;
void Circle::project(const Vec2& axis, float* min, float* max) const
{
*min = Vec2::dot(center - axis * radius, axis);
*max = Vec2::dot(center + axis * radius, axis);
}