Skip to content

Conversation

@daft7
Copy link
Contributor

@daft7 daft7 commented Dec 3, 2025

Arranged functions in both header and cpp in objdiff order. Some cleanup. Also implemented last two function that needed it. Plan to do more cleanup but this file gets touched a lot and thought I'd kick up what I had.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

main/SB/Core/x/xMath3

Section From To Bytes
📈 .text 91.73% 94.17% +178
Function From To Bytes
📈 xBoxFromCircle(xBox&, const xVec3&, const xVec3&, float) 0.00% 55.62% +142
xQuatLength2(const xQuat*) 0.00% 100.00% +36

void xMat3x3Normalize(xMat3x3* o, const xMat3x3* m)
{
xMat4x3 temp;
xVec3Normalize((xVec3*)o, (xVec3*)m);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
xVec3Normalize((xVec3*)o, (xVec3*)m);
xVec3Normalize(&o->right, &m->right);

m->at.z = 0.0f;
return temp_f31;
}
if (((F32)__fabs(at->z) < 0.00001f) && ((F32)__fabs(at->x) < 0.00001f))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out the FABS macro for this one

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

main/SB/Core/x/xMath3

Section From To Bytes
📈 .text 91.73% 94.17% +178
Function From To Bytes
📈 xBoxFromCircle(xBox&, const xVec3&, const xVec3&, float) 0.00% 55.62% +142
xQuatLength2(const xQuat*) 0.00% 100.00% +36

Copy link
Collaborator

@JoshSanch JoshSanch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always glad to see cleanup PRs, especially now that we're getting closer to project completion. Modders will thank you for your service

@JoshSanch JoshSanch merged commit f155c4f into bfbbdecomp:main Dec 3, 2025
5 checks passed
@daft7 daft7 deleted the xMath3 branch December 3, 2025 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants