Module rusty_gfx::util

source ·

Functions

  • Compute the direction (angle in radians, where 0 is in the positive x direction) from v1 to v2
  • If the length of a vector is longer than magnitude, scale the vector’s length to equal magnitude
  • Given a length of a side of a square centered at (0.0, 0.0), return a Vec2 that resides somewhere within it.