VOOZH about

URL: https://www.geeksforgeeks.org/javascript/less-js-math-acos-function/

⇱ Less.js Math acos() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Less.js Math acos() Function

Last Updated : 23 Jul, 2025

Less.js is a simple CSS pre-processor that facilitates the creation of manageable, customizable, and reusable style sheets for websites. Because CSS is a dynamic style sheet language, it was chosen. Because LESS is adaptable, it works with a wide range of browsers. Only CSS that has been written in and processed using the CSS pre-processor, a programming language, can be used by web browsers. In addition to providing capabilities like variables, functions, mixins, and operations to help create dynamic CSS while maintaining backward compatibility, it is a CSS language extension.

In this article, we are going to discuss the Math acos() function, which is used to do the arc cosine function on a given value. Basically, it is used to find the inverse cos value of a value. This function takes a floating number or deg value or rad value as a parameter and performs an operation on that value and returns a number

Syntax:

acos(value)
 

Parameters:

  • value: This is the only compulsory parameter for this function. This parameter takes a floating number.

Return type: This method returns a floating number.

Example 1: The code below demonstrates the usage and implementation of the Misc acos() function.

styles.less:

Now, to compile the above LESS code to CSS code, run the following command:

lessc style.less style.css

style.css: The CSS output of the above Less file was compiled.

Output:

👁 Image
 

Example 2: The code below demonstrates the usage and implementation of the Misc acos() function along with isnumber type function if() and boolean logical functions.

style.less:

Now, to compile the above LESS code to CSS code, run the following command:

lessc style.less style.css

style.css:  The CSS output of the above Less file was compiled.

Comment