The rule of the midline of the trigonometry function

Is 1/2 the sum of the maximum and minimum values of y
From the attached picture we can see that
The maximum value of y is 3
The minimum value of y is -1
Then the equation of the midline is

Then the answer should b A or B
To find the amplitude find 1/2 the difference between the maximum and the minimum values of y

The amplitude is 2
The answer is B