简体   繁体   中英

can I find the cosine inverse to find the angle of a triangle

I am trying to find the angle of a triangle I have complete most of the work using this formula

在此处输入图片说明 now Problem is that how to find cos inverse in PHP I have the code below to find the cosine inverse

echo acos(42/90);

it returns a float value, not angle.

Trigonometric functions work with radians, not degrees, so you have to calculate

$AngleInDegrees = rad2deg(acos(42/90))
or
$AngleInDegrees = acos(42/90) * 180 / Pi();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM