Asked • 04/20/19

Given a degree x, find the nearest degree in an array of degrees?

I have an array of degrees, [10, 90, 200, 280, 355] for a circle. I'm given a degree, let's say 1. How do I determine that 1 is closest to 355 degrees?

1 Expert Answer

By:

Kenneth Y. answered • 09/24/19

Tutor
New to Wyzant

Experienced CS Tutor Specializing in Python, JavaScript, Ruby++

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.