Tests are not documentation. You do have some documentation in your README, but it's rather curt.davisdude wrote:I have most of it documented, except some of the newer ones, 'cause I sorta forgot...
Math & Collisions library
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: mlib: Math Library
Help us help you: attach a .love.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: mlib: Math Library
Totally true. I second that. Plus, that is the reason for what I suggested LDoc. It helps parsing documentation from code comments, and also let you writeadditional documentation in a narrative style, which is awesome.Robin wrote: Tests are not documentation. You do have some documentation in your README, but it's rather curt.
But beware, writing documentation is tedious. But in the end, it gives to the whole project a bit more of genuine and some seriousness.
And it is really helpful to the user. In doubt, no need to ask systematically a question, one can read the docs first.
Re: mlib: Math Library
Oh, I thought tests were documentation. My bad.Robin wrote:Tests are not documentation. You do have some documentation in your README, but it's rather curt.
As for the documentation, do you mind explaining how I could make it more in-depth? I thought they were pretty clear, myself (but then again, I did make them, so I know how they work...)
Not that I think that LDoc is bad or anything, it's just like it seems like it's too much to work with. I may still do it, but for now I don't think I will.
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
Re: mlib: Math Library
1.9.1 is now out!
Changes:
v. 1.9.1 -Made mlib.line.closestPoint able to take either two points on the slope or the slope and intercept.
v. 1.9.0 -Added mlib.lineSegmentIntersects (no affiliation with previous one (changed to mlib.line.segment.intersect)) and mlib.line.closestPoint
Changes:
v. 1.9.1 -Made mlib.line.closestPoint able to take either two points on the slope or the slope and intercept.
v. 1.9.0 -Added mlib.lineSegmentIntersects (no affiliation with previous one (changed to mlib.line.segment.intersect)) and mlib.line.closestPoint
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
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: mlib: Math Library
When reading an API documentation, I want to know the following things: (bolded are the things missing)davisdude wrote:As for the documentation, do you mind explaining how I could make it more in-depth?
- The function name
- What the function does/calculates exactly
- When I would want to use it
- The arguments, their description, domain, units, typical and extreme values
- A description for the return value, its range, units, typical and extreme values
Help us help you: attach a .love.
Re: mlib: Math Library
Okay, thanks. I'll get to work on that.Robin wrote:When reading an API documentation, I want to know the following things: (bolded are the things missing)The functions in milb.stats are pretty well-documented. The ones in mlib.line and mlib.polygon rather less so. mlib.math is a mixed bag, and the documentation for mlib.circle is decent.
- The function name
What the function does/calculates exactly
When I would want to use it
The arguments, their description, domain, units, typical and extreme values
A description for the return value, its range, units, typical and extreme values
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
Re: mlib: Math Library
Updated readme! Hopefully my documentation is more complete now!
1.9.2 is also out! I made some changes to be compatible with 0.9.0!
1.9.2 is also out! I made some changes to be compatible with 0.9.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
Re: mlib: Math Library
So, how's the documentation? Any better?
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
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: mlib: Math Library
The documentation is much better.
Something weird is going on here: https://github.com/davisdude/mlib#mlibmathprime-1
Was that a mistake? (Also, I doubt you often have to check if multiple numbers are prime, so the special casing seems to be a bit weird. Looking at the source code for mlib.math.prime that it is a really bad. For one thing, checking if a number is prime can trivially be done in O(sqrt(n)), but your algorithm takes O(n).)
Also, please don't double post after only ten hours, especially if you have nothing to add.
Something weird is going on here: https://github.com/davisdude/mlib#mlibmathprime-1
Was that a mistake? (Also, I doubt you often have to check if multiple numbers are prime, so the special casing seems to be a bit weird. Looking at the source code for mlib.math.prime that it is a really bad. For one thing, checking if a number is prime can trivially be done in O(sqrt(n)), but your algorithm takes O(n).)
Also, please don't double post after only ten hours, especially if you have nothing to add.
Help us help you: attach a .love.
Re: mlib: Math Library
Oh, okay. Sorry.Robin wrote:Also, please don't double post after only ten hours, especially if you have nothing to add.
Also: I fixedit now. After spending ~6 straight hours on it, I knew there was bound to be at least one mistake!
Also, if you don't mind, how would I decrease the amount of time taken? I didn't look up a formula, I just sort of did what made sense to me.
I don't really know of a case where you would check for multiple numbers, but just thought it would be a nice added functionality.
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
Who is online
Users browsing this forum: No registered users and 4 guests