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

[4.0] Add explicit operators for Color4/Vector4 conversions #858

Merged
merged 2 commits into from
Nov 16, 2018
Merged

[4.0] Add explicit operators for Color4/Vector4 conversions #858

merged 2 commits into from
Nov 16, 2018

Conversation

devvoid
Copy link
Contributor

@devvoid devvoid commented Nov 16, 2018

Purpose of this PR

  • Adds operators to convert between Color4 and Vector4.
  • Affects OpenTK.Mathematics
  • No extra documentation needed.

Testing status

Comments

  • Operation is only unsafe in a technical context, which is why it's wrapped in a big unsafe block.
  • LayoutType is added to Color4 just for consistancy's sake with other types.
  • Closes Color4 and Vector4 should be compatible #833.

@varon varon self-requested a review November 16, 2018 08:06
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.

Solid work. Looks good. Just needs to drop the fixed keyword and clarify the docs a bit.

src/OpenTK.Mathematics/Data/Color4.cs Outdated Show resolved Hide resolved
src/OpenTK.Mathematics/Data/Color4.cs Show resolved Hide resolved
src/OpenTK.Mathematics/Data/Color4.cs Show resolved Hide resolved
src/OpenTK.Mathematics/Vector/Vector4.cs Show resolved Hide resolved
src/OpenTK.Mathematics/Vector/Vector4.cs Outdated Show resolved Hide resolved
@varon
Copy link
Member

varon commented Nov 16, 2018

Thanks for all of the super prompt changes. Nice work on these.

@devvoid
Copy link
Contributor Author

devvoid commented Nov 16, 2018

No problem

@varon varon merged commit 8671098 into opentk:master Nov 16, 2018
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

3 participants