Use Math.acos. You can't just say acos() as that's not a method of your class.

Also, be careful to make sure when checking for sines and cosines that it's returning degrees or radians like you...