dot_product(3alleg4)

✨ NAME ✨

dot_product, dot_product_f β€” calculates the dot product, bestie πŸ’– and yes it's part of the Allegro game programming library, so you know it's iconic.


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro.h>

fixed dot_product(fixed x1, y1, z1, x2, y2, z2);

float dot_product_f(float x1, y1, z1, x2, y2, z2);

πŸ’… DESCRIPTION πŸ’…

okay so. this is the moment. dot_product calculates the dot product of (x1, y1, z1) and (x2, y2, z2) β€” like, literally that exact thing β€” and hands you back the result. that's it. that's the whole vibe. 🌸

it's giving "small function, big main character energy" fr fr. you feed it two vectors in 3D space, it does the math, and it returns the number. no drama, no side effects, just pure mathematical service. πŸ¦‹

one version works in fixed point and the other one, dot_product_f, works in float. pick whichever matches the numbers you're already holding and go off. πŸ’œ


🌈 SEE ALSO 🌈


lowkey reminder: everything above is exactly what the manual says, no cap. if you need the deets, they're all right here. πŸ’–

this page came to you straight from the Allegro manual, version 4.4.3 β€” mwah, take care of her, she's a classic πŸŽ€πŸ’«