liveBook · Manning

Degrees

As explained in Data-Oriented Programming in Java

A degree is an angular measurement unit equal to one three-sixtieth of a full rotation.

Degrees measure angles as fractions of a full rotation. In a contact-angle domain, specifying degrees instead of leaving the unit implicit prevents confusion with radians or gradians and gives the value clear business meaning. section 3.1

The modeled degrees are signed and bounded from -180° inclusive to 180° exclusive. Individual measurements are positive, but differences can describe an angle becoming shallower over time. section 3.1

A precise degrees value carries these domain constraints:

  • Use hundredth-of-a-degree precision because the measuring rig resolves changes to approximately 1/100th of a degree. section 3.1
  • Treat the unit as part of the data model rather than as an assumption attached to an unqualified number. section 3.1 section 1.0
  • Record the domain rules explicitly so invalid values and unclear interpretations can be identified before they spread through the program. section 3.1

Contact-angle measurement

A curing measurement may record a contactAngle of 17.4 degrees on day 3. Later measurements can be compared as signed degree differences, including decreases in angle. section 3.1

How Data-Oriented Programming in Java covers it

How deep it goes
Defines the unit, signed range, and hundredth-degree precision, while stopping short of implementation details for a dedicated value type.
Examples
Uses contact-angle readings from tung-oil curing, including a 17.4-degree JSON measurement.
What it assumes
Assumes basic programming and angle terminology, while teaching why units and measurement invariants must be made explicit.
What you can do after
Evaluate/understand angle data by checking its unit, signed range, precision, and intended domain meaning.
How it connects
Connects degrees with angles, radians, gradians, invariants, and type-system modeling.

Also explained in

Compare how 2 books explain degrees →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data-Oriented Programming in Java. The section links point to the parts of the book it draws on.