From 42321de5c55df22b158d819439ba7bb85cfd81fc Mon Sep 17 00:00:00 2001 From: AnthonyMichaelTDM <68485672+AnthonyMichaelTDM@users.noreply.github.com> Date: Sat, 14 May 2022 23:42:15 -0700 Subject: [PATCH] update README of orbit because there's an error https://en.wikipedia.org/wiki/Law_of_cosines --- 68_Orbit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/68_Orbit/README.md b/68_Orbit/README.md index 01fb758c..9e4e9afd 100644 --- a/68_Orbit/README.md +++ b/68_Orbit/README.md @@ -23,7 +23,7 @@ of orbit < ^ ship The distance of the bomb from the ship is computed using the law of consines. The law of cosines states: ``` -D = SQUAREROOT( R**2+D1**2+R*D1*COS(A-A1) ) +D = SQUAREROOT( R**2 + D1**2 - 2*R*D1*COS(A-A1) ) ``` Where D is the distance between the ship and the bomb, R is the altitude of the ship, D1 is the altitude of the bomb, and A-A1 is the angle between the ship and the bomb.