mirror of
https://git.coom.tech/drummyfish/raycastlib.git
synced 2024-11-23 20:49:57 +01:00
Fix division by zero
This commit is contained in:
parent
dc843e6bab
commit
e484dd6bd1
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
author: Miloslav "drummyfish" Ciz
|
author: Miloslav "drummyfish" Ciz
|
||||||
license: CC0 1.0
|
license: CC0 1.0
|
||||||
version: 0.908d
|
version: 0.909d
|
||||||
|
|
||||||
Version numbering: major.minor[d], id 'd' is appended, this is a
|
Version numbering: major.minor[d], id 'd' is appended, this is a
|
||||||
in-development version based on the previous stable major.minor version. Two
|
in-development version based on the previous stable major.minor version. Two
|
||||||
|
@ -1784,7 +1784,7 @@ RCL_Unit RCL_castRay3D(
|
||||||
ray.direction.x = pos2.x - pos1.x;
|
ray.direction.x = pos2.x - pos1.x;
|
||||||
ray.direction.y = pos2.y - pos1.y;
|
ray.direction.y = pos2.y - pos1.y;
|
||||||
|
|
||||||
distance = RCL_len(ray.direction);
|
distance = RCL_nonZero(RCL_len(ray.direction));
|
||||||
|
|
||||||
ray.direction = RCL_normalize(ray.direction);
|
ray.direction = RCL_normalize(ray.direction);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue