Skip to content

Commit

Permalink
Minor syntax changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
shayshunk committed Mar 2, 2024
1 parent b2dd051 commit 9176b8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Include/Sphere.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ class Sphere : public Hittable
auto c = oc.LengthSquared() - radius * radius;

auto discriminant = half_b * half_b - a * c;

if (discriminant < 0)
return false;

auto sqrtd = sqrt(discriminant);

// Find the nearest root that lies in the acceptable range.
Expand Down

0 comments on commit 9176b8e

Please sign in to comment.