A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/javascript-math-sin-method/ below:

JavaScript Math sin() Method - GeeksforGeeks

JavaScript Math sin() Method

Last Updated : 15 Jul, 2024

The JavaScript Math sin( ) method in Javascript is used to return the sine of a number. The Math.sin() method returns a numeric value between -1 and 1, which represents the sine of the angle given in radians. The sin() is a static method of Math, therefore, it is always used as Math.sin(), rather than as a method of a Math object created. 

Syntax:
Math.sin(value)
Parameters:

This method accepts a single parameter as mentioned above and described below:

Return Value:

The Math.sin() method returns the sine of the given numbers between 1 and -1. 

Example 1: Below is an example of the Math sin() Method.

JavaScript
console.log("When zero is passed as a parameter: "
    + Math.sin(0));

Output
When zero is passed as a parameter: 0

Example 2: When 1 is passed as a parameter. 

JavaScript
console.log("Result : " + Math.sin(1));

Output
Result : 0.8414709848078965

Example 3: When PI is passed as a parameter. 

JavaScript
console.log("Result : " + Math.sin(Math.PI / 2));

We have a complete list of Javascript Math Objects methods, to check those please go through this Javascript Math Object Complete reference article.

Supported Browsers

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4