mirror of
https://github.com/bkaradzic/bx.git
synced 2026-10-23 01:01:06 +00:00
Fixed calcMinBoundingSphere hang, and ProcessReader quoting on Windows. (#463)
This commit is contained in:
committed by
GitHub
parent
a29c286430
commit
ad000aeb31
@@ -961,6 +961,23 @@ TEST_CASE("calcMinBoundingSphere", "[bounds]")
|
||||
REQUIRE(sphere.radius >= 1.73f - 0.05f);
|
||||
}
|
||||
|
||||
TEST_CASE("calcMinBoundingSphere far from origin", "[bounds]")
|
||||
{
|
||||
const bx::Vec3 verts[] = {
|
||||
{10000000.0f - 10.0f, 0.0f, 0.0f},
|
||||
{10000000.0f + 10.0f, 0.0f, 0.0f},
|
||||
{10000000.0f + 11.0f, 0.0f, 0.0f},
|
||||
};
|
||||
|
||||
bx::Sphere sphere;
|
||||
bx::calcMinBoundingSphere(sphere, verts, BX_COUNTOF(verts), sizeof(bx::Vec3) );
|
||||
|
||||
for (uint32_t ii = 0; ii < BX_COUNTOF(verts); ++ii)
|
||||
{
|
||||
REQUIRE(bx::distanceSq(sphere.center, verts[ii]) <= bx::square(sphere.radius) );
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("calcObb from cube vertices", "[bounds]")
|
||||
{
|
||||
const bx::Vec3 verts[] = {
|
||||
|
||||
Reference in New Issue
Block a user