Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 2, 2019

Follow-up of #17120. Box3, Math, Matrix4, Ray and Triangle.

@Mugen87 Mugen87 added this to the r108 milestone Aug 2, 2019
@Mugen87 Mugen87 merged commit f708cb4 into mrdoob:dev Aug 5, 2019
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 5, 2019

Okay, all closures are now removed from Math. Time to move on with other folders and QS^^.

getBarycoord: function ( point, a, b, c, target ) {

return function getBarycoord( point, a, b, c, target ) {
if ( _v1 === undefined ) {
Copy link
Owner

Choose a reason for hiding this comment

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

I understand why this is not checking for _v0, but I think checking for _v2 may be easier to understand.

Copy link
Owner

Choose a reason for hiding this comment

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

I mean changing the pattern to check for the last item instead of the first item (in this case the second item because of... reasons).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay, makes sense. I'll adapt this pattern for future PRs 👍. Triangle is improved here: #17182

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.

2 participants