Skip to content

Commit

Permalink
github web editor is a piece of excrement
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Jan 3, 2025
1 parent c22fa06 commit 9cd09f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/VoxelRayTrace.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ public static function betweenPoints(Vector3 $start, Vector3 $end) : \Generator{
}

/**
* Used to decide which direction to move in first when beginning a ray trace.
* Used to decide which direction to move in first when beginning a ray trace.
*
* Examples:
* Examples:
* s=0.25, ds=0.5 -> 0.25 + 1.5(0.5) = 1 -> returns 1.5
* s=0.25, ds=-0.5 -> 0.25 + 0.5(-0.5) = 0 -> returns 0.5
* s=0.25, ds=-0.5 -> 0.25 + 0.5(-0.5) = 0 -> returns 0.5
* s=1 ds=0.5 -> 1 + 2(0.5) = 2 -> returns 2
* s=1 ds=-0.5 -> 1 + 0(-0.5) = 1 -> returns 0 (ds is negative and any subtraction will change 1 to 0.x)
* s=1 ds=-0.5 -> 1 + 0(-0.5) = 1 -> returns 0 (ds is negative and any subtraction will change 1 to 0.x)
*
* @param float $s Starting coordinate
* @param float $ds Direction vector component of the relevant axis
Expand Down

0 comments on commit 9cd09f2

Please sign in to comment.