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

Add math.diag #193

Open
olokobayusuf opened this issue Jun 9, 2021 · 3 comments
Open

Add math.diag #193

olokobayusuf opened this issue Jun 9, 2021 · 3 comments

Comments

@olokobayusuf
Copy link

olokobayusuf commented Jun 9, 2021

It'll be great to be able to do the following:

float2 scale = float2(2f, 3f);
float2x2 transform = diag(scale);
// Yields:
// 2f 0f
// 0f 3f
@unpacklo
Copy link
Collaborator

Great idea, I'll be considering it for a future version of Mathematics!

ltmx added a commit to ltmx/Unity.mathx that referenced this issue Sep 27, 2023
@ltmx
Copy link

ltmx commented Sep 27, 2023

I implemented it for you my friend, in Unity.mathx :)
Commit => ltmx/Unity.mathx@868d045

@olokobayusuf
Copy link
Author

@ltmx thanks for this! I'm surprised this issue has gotten no movement for almost three years now.

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

3 participants