mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 12:58:00 +03:00
Merge branch 'fix_test_2' into 'master'
Some checks failed
Build and test / Ubuntu (push) Has been cancelled
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Some checks failed
Build and test / Ubuntu (push) Has been cancelled
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Reduce precision for random point distance comparison (#8260) See merge request OpenMW/openmw!4486
This commit is contained in:
commit
69c4a68187
1 changed files with 4 additions and 3 deletions
|
@ -610,12 +610,13 @@ namespace
|
|||
const auto result = findRandomPointAroundCircle(
|
||||
*mNavigator, mAgentBounds, mStart, 100.0, Flag_walk, []() { return Misc::Rng::rollClosedProbability(); });
|
||||
|
||||
ASSERT_THAT(result, Optional(Vec3fEq(70.35845947265625, 335.592041015625, -2.6667339801788330078125, 1)))
|
||||
<< (result ? *result : osg::Vec3f());
|
||||
ASSERT_TRUE(result.has_value());
|
||||
|
||||
EXPECT_THAT(*result, Vec3fEq(70.35845947265625, 335.592041015625, -2.6667339801788330078125, 1)) << *result;
|
||||
|
||||
const auto distance = (*result - mStart).length();
|
||||
|
||||
EXPECT_FLOAT_EQ(distance, 125.80865478515625) << distance;
|
||||
EXPECT_NEAR(distance, 125.80865478515625, 1) << distance;
|
||||
}
|
||||
|
||||
TEST_F(DetourNavigatorNavigatorTest, multiple_threads_should_lock_tiles)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue