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

Issue 1520 calculator structure #1523

Closed
wants to merge 5 commits into from
Closed

Issue 1520 calculator structure #1523

wants to merge 5 commits into from

Conversation

mthiffau
Copy link
Contributor

@mthiffau mthiffau commented Mar 7, 2016

I've added .Equals and == operators to Direction and TimeStamp which didn't have them before. As I understand this is to help move away from TryOperation.

hvacengi and others added 4 commits March 7, 2016 11:48
Vector.cs
* Add Equals override method
* Add == and != operators
CalculatorStructure.cs
* Reduce dependence on Structure.TryOperation
* Throw exceptions instead of TryOperation
* Give the KOSName for types instead of C# name
Add unit tests for scalar and structure.
CalculatorStructure.cs
* Fixed the root of the recursion issue.  Some types (specifically
Vector) have implicit conversions that caused TryCoerceImplicit to
continue to call over and over until running out of memory.
@hvacengi hvacengi modified the milestone: v0.19.2 Mar 8, 2016
// Check the equality of the quaternion components
if (d.rotation.x == rotation.x &&
d.rotation.y == rotation.y &&
d.rotation.z == rotation.z)
Copy link
Member

Choose a reason for hiding this comment

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

UnityEngine.Quaternion already has its own Equals() operator method defined. It might be a good idea to just defer to using that instead of re-implementing it (and I had a peek in ILSpy and it turns out what you're doing here isn't quite the same thing Unity is doing for Equals. You only compare the x, y, and z and Unity is comparing all 4 components (including the w).)

@Dunbaratu Dunbaratu removed this from the v0.19.2 milestone Mar 8, 2016
@Dunbaratu
Copy link
Member

Removed milestone because we want more time to work this through and test it - just took the infnite recursion fix and nothing else for now.

@hvacengi hvacengi added this to the v1.0.0 milestone Mar 8, 2016
@hvacengi
Copy link
Member

hvacengi commented Mar 8, 2016

I'm adding the 1.0 milestone so that we don't miss it in that version

@hvacengi hvacengi added the Testing Issues related to making an automated build & test infrastructure. label Mar 8, 2016
@hvacengi hvacengi self-assigned this Mar 8, 2016
@hvacengi hvacengi mentioned this pull request Mar 25, 2016
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Issues related to making an automated build & test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants