Mathematical Functions Reference

Comprehensive showcase of play.ts's math utilities with vector operations, constants, and edge case examples.

📐 This example showcases the mathematical foundation of the play.ts library

Key Concepts Demonstrated

  • clamp(): Constrains values within a range
  • lerp(): Linear interpolation between two values
  • map(): Remaps values from one range to another
  • Vector operations: 2D and 3D vector mathematics
  • Angle conversion: Radians to degrees and vice versa