Math & Collisions library

Showcase your libraries, tools and other projects that help your fellow love users.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: mlib: Math Library

Post by davisdude »

5th post in a row now... :cry:
Enjoy! v. 1.6.0 :)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: mlib: Math Library

Post by Roland_Yonaba »

Making posts in a row is not really a problem here, since you are bringing new content, and new piece of information.
But if you are going to do that, please be descriptive enough. What are the exact new changes that brings v1.6.0 ?
List them, as it makes your post more complete. :)
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: mlib: Math Library

Post by davisdude »

Roland_Yonaba wrote:Making posts in a row is not really a problem here, since you are bringing new content, and new piece of information.
Well that's good! :)
Well, here's the new information:
Added mlib.summation, mlib.getPercentOfChange, mlib.getPercent, mlib.pointOnCircle, mlib.getCircumference, mlib.quadraticFactor, and mlib.isSecant.

If you guys can think of anything to add, please don't hesitate to tell me! :)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: mlib: Math Library

Post by davisdude »

Version 1.6.1 out now! Changes:
Employed usage of summations for mlib.getPolygonArea and mlib.getPolygonCentroid and removed area as an argument for mlib.getPolygonCentroid.
Happy coding! :)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: mlib: Math Library

Post by davisdude »

1.7.0 is now out! It's been a while, but several new functions were added, so it's worth the wait (I hope)! :)
Changes: Added mlib.circlesIntersect, mlib.pointOnLineSegment, mlib.linesIntersect, and mlib.lineSegmentsIntersect

I'm thinking of making this more of a collision library with math functions as well. What do you think about that?
As always, I'm open to suggestion, feedback, criticism (but keep it constructive!), etc. :D
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: mlib: Math Library

Post by davisdude »

v. 1.7.1 is out now!
Changed mlib.lineSegmentsIntersect so that it now returns the two places in between where the line segments begin to intersect. Before it returned false.
Happy coding! :)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: mlib: Math Library

Post by davisdude »

1.7.4 is out now! Changes:
v. 1.7.4 -mlib.lineSegmentsIntersect vertical parallels fixed
v. 1.7.3 -mlib.lineSegmentsIntersect parallels fixed
v. 1.7.2 -mlib.lineSegmentsIntersect now handles vertical lines
v. 1.7.1 -mlib.lineSegmentsIntersect now returns the two places in between where the line segments begin to intersect.
v. 1.7.0 -Added mlib.circlesIntersect, mlib.pointOnLineSegment, mlib.linesIntersect, and mlib.lineSegmentsIntersect
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: mlib: Math Library

Post by davisdude »

1.8.0 is out now!
Changes:
-1.7.5: Fixed mlib.lineSegmentsIntersect for the last time (so far, at least...)
-1.8.0: Added mlib.pointInPolygon!
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: mlib: Math Library

Post by Roland_Yonaba »

Well, this is iterating really fast. :)
As the number of functions is growing, you might want to split it into smaller modules ? Not standard Lua modules, I was thinking of separating the whole set of functions into smaller tables ?
mlib.segment
mlib.point
mlib.polygon
etc, etc
And you might want to write some documentation for that.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: mlib: Math Library

Post by davisdude »

Roland_Yonaba wrote:Well, this is iterating really fast. :)
Yeah. I just can't stand doing nothing... :P
Roland_Yonaba wrote:As the number of functions is growing, you might want to split it into smaller modules ? Not standard Lua modules, I was thinking of separating the whole set of functions into smaller tables ?
mlib.segment
mlib.point
mlib.polygon
etc, etc
I too was thinking about that, but last time when I did a poll, nobody wanted it. I think I'll do it anyway, it will make it more like the LÖVE framework.
Roland_Yonaba wrote:And you might want to write some documentation for that.
I have most of it documented, except some of the newer ones, 'cause I sorta forgot... :P

EDIT: Now all functions are documented.
And 1.8.2 is out now. Fixed the command that shall remain nameless... :x (Yeah, you know who you are...)
And 1.8.3 is out now. Changed naming stuff. All are different, so look at either the code or readme on GitHub. I also arranged the code to be more organized (grouped by type).

If you don't like something about the new naming system, please tell me! ;)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests