Library reference

Sine

For a right triangle, sine links an angle to the side opposite it. A 30-degree angle is about 0.5236 radians. Supply the angle in radians, then multiply by the sloping length to find the rise.

Math.Sin

Simple example

Use an angle of zero radians.

Start0
Result0
Program.cs
using System;

Console.WriteLine(Math.Sin(0.0));
Output
0
Advertisements

Everyday examples

A scale drawing shows a four-metre ladder at 30 degrees to the ground. How high is its top in metres?

Start0.5235987755982988
Result1.9999999999999998
Program.cs
using System;

Console.WriteLine(4.0 * Math.Sin(0.5235987755982988));
Output
1.9999999999999998

A Ferris wheel has an eight-metre radius. The hub is ten metres above the ground. When the cabin is 30 degrees above the horizontal, how high is it above the ground?

Start0.5235987755982988
Result14
Program.cs
using System;

Console.WriteLine(10.0 + 8.0 * Math.Sin(0.5235987755982988));
Output
14

A two-metre model ramp rises at 30 degrees. How many metres does it rise?

Start0.5235987755982988
Result0.9999999999999999
Program.cs
using System;

Console.WriteLine(2.0 * Math.Sin(0.5235987755982988));
Output
0.9999999999999999
Run the example
Terminal
dotnet new console --output Lesson
cp Program.cs Lesson/Program.cs
dotnet run --project Lesson
Official documentation