Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] function V4ExtractMax seems wrong. #346

Open
o0olele opened this issue Dec 14, 2024 · 0 comments
Open

[question] function V4ExtractMax seems wrong. #346

o0olele opened this issue Dec 14, 2024 · 0 comments

Comments

@o0olele
Copy link

o0olele commented Dec 14, 2024

PX_FORCE_INLINE FloatV V4ExtractMax(const Vec4V a)
{
	const PxF32 t0 = (a.x >= a.y) ? a.x : a.y;
	const PxF32 t1 = (a.z >= a.w) ? a.x : a.w;
	return t0 >= t1 ? t0 : t1;
}
  • is the function V4ExtractMax return the max value of x,y,z,w in Vec4V? if so, i think is:
PX_FORCE_INLINE FloatV V4ExtractMax(const Vec4V a)
{
	const PxF32 t0 = (a.x >= a.y) ? a.x : a.y;
	const PxF32 t1 = (a.z >= a.w) ? a.z : a.w;
	return t0 >= t1 ? t0 : t1;
}
  • same for V4ExtractMin.
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

No branches or pull requests

1 participant