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

Vec3 Functions **BROKEN** #16

Closed
Mustafif opened this issue Apr 24, 2024 · 1 comment
Closed

Vec3 Functions **BROKEN** #16

Mustafif opened this issue Apr 24, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Mustafif
Copy link
Collaborator

Since we do not have a proper test suite, especially with newer functions, we have the occasionally broken built-in, and sadly, this plague has affected our Vec3-specific functions.

Dot

Version 0.6.0 (Mars Release)
(mufi) >> var x = fvec(3);
(mufi) >> var y = fvec(3);
(mufi) >> push(x, 1.0, 2.0, 3.0);
(mufi) >> push(y, 1.0, 2.0, 3.0);
(mufi) >> print dot(x, y);
Vectors are not of size 3
0

Cross

(mufi) >> print cross(x, y);
Vectors are not of size 3
Segmentation fault at address 0x0
???:?:?: 0x1092db3 in ??? ()
Unwind error at address `:0x1092db3` (error.InvalidDebugInfo), trace may be incomplete

Norm

Version 0.6.0 (Mars Release)
(mufi) >> var x = linspace(1.0, 3.0, 3);
(mufi) >> var y = linspace(1.0, 3.0, 3);
(mufi) >> print norm(x);
Cannot normalize a zero vector
Segmentation fault at address 0x0
???:?:?: 0x1092db3 in ??? ()
Unwind error at address `:0x1092db3` (error.InvalidDebugInfo), trace may be incomplete

Angle

Version 0.6.0 (Mars Release)
(mufi) >> var x = linspace(1.0, 3.0, 3);
(mufi) >> var y = linspace(1.0, 3.0, 3);
(mufi) >> print angle(x, y);
Vectors are not of size 3
nan

Proj

(mufi) >> print proj(x, y);
Vectors are not of size 3
Vectors are not of size 3
[nan, nan, nan]

Others behave just like proj, the main issue we can see is that the size 3 not being detected properly. That will be the first issue tackled, and hopefully 90% of these errors will be fixed.

@Mustafif Mustafif added bug Something isn't working good first issue Good for newcomers labels Apr 24, 2024
@Mustafif
Copy link
Collaborator Author

Fixed in 7fbc1b6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant