Skip to content

Commit

Permalink
Implicit conversion to float3 does not work in these cases for MSVC. (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte authored and romainguy committed Nov 27, 2018
1 parent 30092dc commit ae74911
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions filament/include/filament/Box.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class UTILS_PUBLIC Box {
}

Box& set(const math::float3& min, const math::float3& max) noexcept {
center = (max + min) * 0.5f;
halfExtent = (max - min) * 0.5f;
center = (max + min) * math::float3(0.5f);
halfExtent = (max - min) * math::float3(0.5f);
return *this;
}

Expand All @@ -64,7 +64,7 @@ class UTILS_PUBLIC Box {
struct Aabb {
math::float3 min = std::numeric_limits<float>::max();
math::float3 max = std::numeric_limits<float>::lowest();
math::float3 center() const noexcept { return (min + max) * 0.5f; }
math::float3 center() const noexcept { return (min + max) * math::float3(0.5f); }
bool isEmpty() const noexcept {
return min >= max;
}
Expand Down

0 comments on commit ae74911

Please sign in to comment.