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 tuple deconstructors and conversions to vector types. #933

Merged
merged 1 commit into from
Jun 21, 2019
Merged

Add tuple deconstructors and conversions to vector types. #933

merged 1 commit into from
Jun 21, 2019

Conversation

Vassalware
Copy link
Contributor

This PR adds tuple deconstructors (Vector to tuple) and implicit casts (tuple to Vector) to all vector types in OpenToolkit.Mathematics

This will allow for syntax such as:

Vector2 position = (20.0f, 10.0f);
(float x, float y) = position;

Copy link
Member

@varon varon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful contribution. Thanks @Vassalware !

@varon varon merged commit fbbc872 into opentk:master Jun 21, 2019
@varon
Copy link
Member

varon commented Jun 21, 2019

If you're up for it; some basic tests would be great. Just need to prove the roundtrip works as expected for all types.

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

Successfully merging this pull request may close these issues.

None yet

2 participants