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

make vec2 operator implementation the same as with vec3 #1323

Open
ahmidou opened this issue Nov 21, 2024 · 0 comments
Open

make vec2 operator implementation the same as with vec3 #1323

ahmidou opened this issue Nov 21, 2024 · 0 comments

Comments

@ahmidou
Copy link

ahmidou commented Nov 21, 2024

This is making inheriting from the vec2 type failing to build
for example

template<typename T, qualifier Q>
	template<typename U>
	GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator+=(U scalar)
	{
		this->x += static_cast<T>(scalar);
		this->y += static_cast<T>(scalar);
         }

should be

	template<typename T, qualifier Q>
	template<typename U>
	GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator+=(U scalar)
	{
		return (*this = detail::compute_vec_add<2, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<2, T, Q>(scalar)));
	{
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