Skip to content

Math Acos

Serkan Algur edited this page Nov 22, 2020 · 1 revision

Acos - Arc cosine

func Acos(n float64) float64

Original : https://www.php.net/manual/en/function.acos.php

Returns the arc cosine of arg in radians. acos() is the inverse function of cos(), which means that a==cos(acos(a)) for every value of a that is within acos()' range.

Usage

package main

import (
	"fmt"
	"github.com/serkanalgur/phpfuncs"
)

func main() {
	fmt.Println(phpfuncs.Acos(-1))
}

// Expected Result is '3.141592653589793'
Clone this wiki locally