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 vector types with integer components. #908

Merged
merged 4 commits into from
May 26, 2019
Merged

Add vector types with integer components. #908

merged 4 commits into from
May 26, 2019

Conversation

Vassalware
Copy link
Contributor

@Vassalware Vassalware commented May 22, 2019

The discussion in the discord led to the conclusion that Vector types with integer components should be added to OpenToolkit.Mathematics.

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.

Looking good, just a few changes.

src/OpenTK.Mathematics/Vector/Vector2i.cs Outdated Show resolved Hide resolved
src/OpenTK.Mathematics/Vector/Vector2i.cs Outdated Show resolved Hide resolved
src/OpenTK.Mathematics/Vector/Vector2i.cs Outdated Show resolved Hide resolved
@Vassalware
Copy link
Contributor Author

Resolved the requested changes, let me know if there's anything else.

This was referenced May 23, 2019
@Vassalware Vassalware changed the title [WIP] Add vector types with integer components. Add vector types with integer components. May 24, 2019
Copy link
Contributor

@Perksey Perksey left a comment

Choose a reason for hiding this comment

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

No objections here. Ready to go @varon?

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.

Two minor points for discussion prior to merge.

@@ -0,0 +1,544 @@
//
// Vector3i.cs
Copy link
Member

Choose a reason for hiding this comment

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

Minor, but why are we repeating the file name in the comments? That seems really pointless.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, that should be Vector2i. As a big picture discussion point, not a clue. Jax is the one to talk to about that.

/// <param name="a">Left operand.</param>
/// <param name="b">Right operand.</param>
/// <returns>Result of operation.</returns>
public static Vector2i Add(Vector2i a, Vector2i b)
Copy link
Member

Choose a reason for hiding this comment

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

Can we annotate by-value methods with the Pure attribute?

This is something to look at for the rest of the vector/math library.

@varon varon merged commit f70e7a8 into opentk:master May 26, 2019
@varon
Copy link
Member

varon commented May 26, 2019

Well done and thanks for this very cool contribution, @Vassalware !

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

5 participants