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

Matrices cannot be constructed from a single scalar #206

Closed
mfiano opened this issue Jun 8, 2018 · 2 comments
Closed

Matrices cannot be constructed from a single scalar #206

mfiano opened this issue Jun 8, 2018 · 2 comments
Labels
merged-issue To mark an issue that, whilst valid, has been into another issue

Comments

@mfiano
Copy link

mfiano commented Jun 8, 2018

(mat4 1.0) should create an identity matrix, but there is no applicable method for creating a matrix from a scalar.

The OpenGL wiki states:

If a matrix is constructed with a single scalar value, then that value is used to initialize all the values along the diagonal of the matrix; the rest are given zeros. Therefore, mat4(1.0) is a 4x4 identity matrix.
@mfiano
Copy link
Author

mfiano commented Jun 8, 2018

This gist addresses issues #205 #206 and #207 if you want to copy/paste and ensure I didn't make any mistakes: https://gist.github.com/mfiano/78628dfa7251aba5aef89d7ac587c791

@mfiano mfiano changed the title Matrices cannot be constructed from scalars Matrices cannot be constructed from a single scalar Jun 8, 2018
@cbaggers cbaggers added the merged-issue To mark an issue that, whilst valid, has been into another issue label Jul 1, 2018
@cbaggers
Copy link
Owner

cbaggers commented Jul 1, 2018

Thanks for the report. Merging these matrix type constructor issues into #209

@cbaggers cbaggers closed this as completed Jul 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-issue To mark an issue that, whilst valid, has been into another issue
Projects
None yet
Development

No branches or pull requests

2 participants