Languages
[Edit]
EN

C# / .NET - Math.Sin() method example

0 points
Created by:
Pearl-Hurley
559

Math.Sin is a static method that takes only one parameter and returns an approximation of sine mathematical function.

Note: 1.2246467991473532e-16 and -1.133107779529596e-15 should be equal to 0 but they are not because of compuptation precision error.


1. Documentation

Edit
Syntax
Parametersnumber - double value that represents an angle in radians (primitive value).
Result

number value calculated as sin(x) mathematical function in a range -1 to +1 (primitive value).

If the function can not calculate it returns NaN.

DescriptionSin is a static method that takes only one parameter and returns an approximation of sin(x) mathematical function.

2. Working with radians

Edit

Output: 

3. Working with degrees

Edit

Output: 

4. Reversed console plot example

Edit

Output: 

References

Edit
  1. Sine - Wikipedia

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

C# / .NET - Math object

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join