added anglebetween to vmathf
This commit is contained in:
parent
1f56608950
commit
fa2ca7241c
|
@ -120,6 +120,10 @@ Vector vrotatef(Vector a, float t) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
static inline
|
static inline
|
||||||
|
float vanglebetweenf(Vector a, Vector b) {
|
||||||
|
return vdotf(a, b) / (vmagnitudef(a) * vmagnitudef(b));
|
||||||
|
}
|
||||||
|
static inline
|
||||||
Vector vprojectf(Vector onto, Vector from) {
|
Vector vprojectf(Vector onto, Vector from) {
|
||||||
float dot = vdotf(onto, from);
|
float dot = vdotf(onto, from);
|
||||||
return vmulff(onto, dot);
|
return vmulff(onto, dot);
|
||||||
|
|
Loading…
Reference in a new issue