liveBook · Manning

Cosine function

The cosine function is a periodic trigonometric function that maps a real number or angle to a value between −1 and 1.

How 3 Manning books explain it

Math for Web Design

cos() is a CSS mathematical function that returns the cosine of an angle.

How it is used
Positions horizontal circle coordinates and drives repeating frontend motion effects.
How deep it goes
Defines cosine through right triangles and unit circles, then works through CSS and JavaScript layout and animation uses.
Examples
Demonstrates a six-item circular menu and a swinging pendulum element.
What you can do after
Apply it via CSS cos() or Math.cos() to calculate horizontal circular positions and oscillating values.

Read how Math for Web Design explains cosine function →

Julia as a Second Language

cos is a Julia function that computes the cosine of an angle or numeric value.

How it is used
Uses cosine to turn measured angles into values for navigation and other triangle-based calculations.
How deep it goes
Explains cosine through navigation, then implements unit-aware methods and conversions without developing a cosine approximation.
Examples
Uses lighthouse navigation, sextant angle measurement, Radian and DMS types, and unit-aware cos calls.
What you can do after
Apply it via Julia’s cos methods to calculate values while making radians or degrees explicit.

Read how Julia as a Second Language explains cosine function →

D3.js in Action, Third Edition

Cosine is a trigonometric function that gives the ratio of the adjacent side to the hypotenuse in a right triangle.

How it is used
Positions vertical coordinates for radial SVG axes in a month-based visualization.
How deep it goes
Defines the right-triangle ratio and works through coordinate equations, without developing broader trigonometric theory.
Examples
Uses a circle with twelve month axes, angle calculations, and SVG line endpoints as concrete artifacts.
What you can do after
Build radial SVG axes by converting angles and radii into vertical endpoint coordinates.

Read how D3.js in Action, Third Edition explains cosine function →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.