quat_slerp(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ NAME ✨

okay so bestie, this is the quat_slerp(3) page from the Allegro manual πŸ’– It's literally the version of quat_interpolate() that lets you control the rotation. And yes, it's part of the Allegro game programming library. Periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the exact incantation, no cap:

       #include <allegro.h>

       void quat_slerp(const QUAT *from, const QUAT *to, float t, QUAT *out,
       int how);

πŸ’… DESCRIPTION πŸ’…

So this is the same as quat_interpolate(), but it allows more control over how the rotation is done. The how parameter can be any one of these iconic values:

  • QUAT_SHORT β€” like quat_interpolate(), use shortest path πŸ›£οΈ
  • QUAT_LONG β€” rotation will be greater than 180 degrees πŸ”„
  • QUAT_CW β€” rotate clockwise when viewed from above πŸ•
  • QUAT_CCW β€” rotate counterclockwise when viewed from above πŸ”„
  • QUAT_USER β€” the quaternions are interpolated exactly as given 🎯

Allegro version 4.4.3, quat_slerp(3), and no date in the footer β€” bye bestie, go rotate something cute πŸ’–πŸ¦‹

πŸ“¦ where this page comes from