Skip to content

Commit 29a99b9

Browse files
committed
Plane - renaming variable for clarity
1 parent 1b3a227 commit 29a99b9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

RaysAndStuff/Plane.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections;
23
using System.Collections.Generic;
34
using System.Linq;
45
using System.Numerics;
@@ -26,8 +27,8 @@ public bool RayIntersection(Vector3 Start, Vector3 Dir, ref float t, ref Vector3
2627
if (Math.Abs(denom) <= 1e-4f)
2728
return (false);
2829

29-
float v0 = -(Vector3.Dot(Normal, Start) + D);
30-
t = v0 / denom; // CALC PARAMETRIC T-VAL
30+
float dist = -(Vector3.Dot(Normal, Start) + D);
31+
t = dist / denom; // CALC PARAMETRIC T-VAL
3132
if (t > 0) // IF INTERSECTION NOT "BEHIND" RAY
3233
{
3334
HitPt = Start + Dir * t; // CALC HIT POINT

0 commit comments

Comments
 (0)