added GridGetX and GridGetY#222
Conversation
ruppysuppy
left a comment
There was a problem hiding this comment.
I didn't quite get the problem, could you explain it in detail?
|
@ruppysuppy This isn't an issue, It's a math contribution. GridGetX() and GridGetY(). returns x/y coordinates for an element in a two dimensional array. x and y coordinates are sometimes superior in grid calculations. Let's say for instance you had an array of 10 by 10 or 100, elements and you wanted to find the shortest distance between element 3, and element 49. In this case coding out a function to return the distance without finding x and y for both elements I found to be painful. If you first find x and y, where 3 becomes 4,1 and 49 becomes 10,5, you can find distance by first subtracting x from x and y from y this returns 6,4 or -6,-4. Next apply absolute value to assure the results are positive, last choose the maximum value of the set, or 6. I 'm sure there are other applications for desiring x and y from 2 dim arrays. |
|
Ok, but since I don't have write permissions, so someone else with the permission has to review your code too |
|
@TangibleDream, there are few things
thank you for the contribution, |
itsvinayak
left a comment
There was a problem hiding this comment.
please don't edit DIRECTORY.md, it is automatically generated by GitHub actions


Welcome to JavaScript community
Describe your change:
Checklist:
Example:
UserProfile.jsis allowed butuserprofile.js,Userprofile.js,user-Profile.js,userProfile.jsare notFixes: #{$ISSUE_NO}.