[msvc] Fix warnings, mainly casting to smaller types (#270)
If the checks by GitHub Actions checks are met, then it seems good to go. Thanks for supporting FOSS4G!
This commit is contained in:
@@ -27,12 +27,12 @@ TEST(FreeCameraOptions, SetLocation) {
|
||||
ASSERT_THAT(options.position.value(), Vec3NearEquals1E7(vec3{{0.0, 0.4282409625, 0.000027532812465}}));
|
||||
|
||||
options.setLocation(
|
||||
{{util::LATITUDE_MAX, 0.0}, util::EARTH_RADIUS_M * M_PI * std::cos(util::LATITUDE_MAX * util::DEG2RAD)});
|
||||
{{util::LATITUDE_MAX, 0.0}, util::EARTH_RADIUS_M * M_PI * std::cos(util::LATITUDE_MAX * util::DEG2RAD_D)});
|
||||
ASSERT_TRUE(options.position);
|
||||
ASSERT_THAT(options.position.value(), Vec3NearEquals1E7(vec3{{0.5, 0.0, 0.5}}));
|
||||
|
||||
options.setLocation(
|
||||
{{-util::LATITUDE_MAX, 0.0}, util::EARTH_RADIUS_M * M_PI * std::cos(-util::LATITUDE_MAX * util::DEG2RAD)});
|
||||
{{-util::LATITUDE_MAX, 0.0}, util::EARTH_RADIUS_M * M_PI * std::cos(-util::LATITUDE_MAX * util::DEG2RAD_D)});
|
||||
ASSERT_TRUE(options.position);
|
||||
ASSERT_THAT(options.position.value(), Vec3NearEquals1E7(vec3{{0.5, 1.0, 0.5}}));
|
||||
}
|
||||
@@ -240,8 +240,8 @@ TEST(FreeCameraOptions, SetPitchBearing) {
|
||||
ASSERT_THAT(up, Vec3NearEquals1E7(vec3{{0.0, 1.0, 0.0}}));
|
||||
ASSERT_THAT(forward, Vec3NearEquals1E7(vec3{{0.0, 0.0, -1.0}}));
|
||||
|
||||
const double cos60 = std::cos(60.0 * util::DEG2RAD);
|
||||
const double sin60 = std::sin(60.0 * util::DEG2RAD);
|
||||
const double cos60 = std::cos(60.0 * util::DEG2RAD_D);
|
||||
const double sin60 = std::sin(60.0 * util::DEG2RAD_D);
|
||||
|
||||
options.setPitchBearing(60.0, 0.0);
|
||||
ASSERT_TRUE(options.orientation);
|
||||
@@ -256,4 +256,4 @@ TEST(FreeCameraOptions, SetPitchBearing) {
|
||||
ASSERT_THAT(right, Vec3NearEquals1E7(vec3{{0.0, 1.0, 0.0}}));
|
||||
ASSERT_THAT(up, Vec3NearEquals1E7(vec3{{cos60, 0.0, sin60}}));
|
||||
ASSERT_THAT(forward, Vec3NearEquals1E7(vec3{{sin60, 0.0, -cos60}}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user