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.

sin

Simple example

Use an angle of zero radians.

Start0
Result0.0
lesson.jl
function main()
    println(sin(0.0))
end

main()
Output
0.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
lesson.jl
function main()
    println(4.0 * sin(0.5235987755982988))
end

main()
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.0
lesson.jl
function main()
    println(10.0 + 8.0 * sin(0.5235987755982988))
end

main()
Output
14.0

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

Start0.5235987755982988
Result0.9999999999999999
lesson.jl
function main()
    println(2.0 * sin(0.5235987755982988))
end

main()
Output
0.9999999999999999
Run the example
Terminal
julia lesson.jl
Official documentation