From 9c546109fd7b21d4d8bd170f153bcd9b543da035 Mon Sep 17 00:00:00 2001 From: Abrar <92129820+Saxsori@users.noreply.github.com> Date: Wed, 9 Nov 2022 20:26:32 +0400 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b05fefa..b49c49a 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ To calculate the horizontal gridline checker formulas. We can follow these steps - The ray Y point should be the player's Y coordinate. -- Then to get the ray X point we can use the right triangle rules `(SOHCAHTOA)`. The ray line would be Hypotenuse, the Opposite is the difference between the player Y coordinate and Ray Y point and the Adjacent is the ray X component which we are trying to find. So ray X is `tan(looking angle) / opposite (ray Y)`. +- Then to get the ray X point we can use the right triangle rules `(SOHCAHTOA)`. The ray line would be Hypotenuse, the Opposite is the difference between the player Y coordinate and Ray Y point and the Adjacent is the ray X component which we are trying to find. So ray X is `opposite (ray Y) / tan(looking angle)`. ![alt text](https://github.com/Saxsori/ray-cast/blob/main/images/4.png)