diff options
Diffstat (limited to 'src/engine/object.h')
| -rw-r--r-- | src/engine/object.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine/object.h b/src/engine/object.h index c45815b..19938d8 100644 --- a/src/engine/object.h +++ b/src/engine/object.h @@ -46,7 +46,7 @@ namespace Donut float a = glm::dot(ray.m_direction, ray.m_direction); float b = 2.0f * glm::dot(oc, ray.m_direction); float c = glm::dot(oc, oc) - m_radius * m_radius; - double discriminant = b*b - 4*a*c; + float discriminant = static_cast<float>(b*b - 4*a*c); if(discriminant < 0) return false; |
