How to get the cosine of a number using cos() function in Swift

1 Answer

0 votes
import Foundation

print(cos(1.7));

print(cos(-1.7));

print(cos(3.0));






/*
run:

-0.12884449429552464
-0.12884449429552464
-0.9899924966004454

*/

 



answered Jun 14, 2023 by avibootz
...