Optional Project 23: Finding the Foci of a Hyperbola

Optional Project 23:  Variables 'h', 'k', 'a', 'b', 'vertical' have been initialized.  

h is the x-coordinate of the center (2 in the first example, 5 in the second example)

k is the y-coordinate of the center (1 in the first example, 4 in the second example)

a is the horizontal distance from the center to vertices/co-vertices (4 in the first example, 3 in the second example)

b is the vertical distance from the center to vertices/co-vertices (2 for both examples)

vertical represents whether the hyperbola is vertical (opens up/down as opposed to left/right)

vertical is true for the first example, false for the second example

Task: Appropriately initialize the values of 'fociX1', 'fociY1', 'fociX2', 'fociY2'

Note: For this project, foci 1 will always be below (smaller y-coordinate) or to the left (smaller x-coordinate) than the corresponding focus.

Second example: fociX1 = 1.39, fociX2 = 8.61, fociY1 = 4, fociY2 = 4

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0