maTH
  • 👋Welcome!
  • 🗿Installation
  • Reference
    • 😱Mathematical operations
      • add
      • pascal
      • factorial
      • factorialL
      • GCD
      • LCM
      • pow
      • permutations
      • combinations
      • combinationsWithRep
      • subtract
      • multiply
      • divide
      • sin
      • cos
      • ln
      • log
      • radToDeg
      • degToRad
      • mod
      • abs
      • floor
      • ceil
      • root
      • exp
      • tan
      • arcsin
      • arccos
      • arctan
      • sinh
      • cosh
      • round
    • 🥶Statistics
      • Binomial
      • Poisson
      • Geometric
      • Pascal
      • Hypergeometric
      • Exponential
      • Uniform
    • 🥵Data structures
      • Stack
      • Queue
      • LinkedList
    • 🤓Algorithms
      • Bubble sort
      • Insertion sort
      • Selection sort
      • Merge sort
      • Quicksort
      • Heap sort
      • Count sort
      • Bucket sort
      • Radix sort
    • 😳Constants
Powered by GitBook
On this page
  1. Reference
  2. Mathematical operations

arccos

Compute arccosine of a given argument

arccos(x);

will return the arccosine of an argument, returned in degress in radians. There is no custom return type, the function always returns an double.

arccos(1); //0°
arccos(0.866); //PI/6 or 30°
arccos(0.707); //PI/4 or 45°
arccos(0.5); //PI/3 or 60°
arccos(0); //PI/2 or 90° 
arccos(-1); //PI or 180°

The argument domain is [-1, 1]. If x is outside the range, the compiler throws:

"Error: arccos is undefined for values outside the domain range [-1, 1]."
PreviousarcsinNextarctan

Last updated 9 months ago

😱