diff options
| author | hachem <im@hachem.wtf> | 2025-08-18 05:02:13 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2025-08-18 05:02:13 +0200 |
| commit | 0c77bdb5a48343005dfdf1509d004b36022efb32 (patch) | |
| tree | 6bc9df4e16037eb557e5a3ce6d0dce4b3323cd48 /src/engine/object.h | |
| parent | d65233be9433a01c54e959aea72e87ff2e385937 (diff) | |
fix: improvements, bump to C++20 and fix bugs
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; |
