ok im not gonna add it then
thanks
Or you could just make a function to return a table with the 4 functions in use.
Like math.average = {mean = math.mean, median = math.median, ...}
that would make the system tedious
itâs better to have them separate
V2 is now out, and make sure to tell me if any bugs are current in V2
enjoy!
- yes
- no
- what is a tutorial?
0 voters
thanks for voting if you did, doryu
Not that you copied or anything, but I made a module to make it easier for myself around a month ago. Hit me up and we can collaborate and I can show you some of my functions, some include things such as finding composite and prime numbers, finding factors of a number, finding probability, and more. Discord: EternalEthel#3567
I didnât even assume that at all
anyways sure we can talk on discord about it
- publish then make tutorial after
- make tutorial and then publish
0 voters
making this because I finished making V3
just making sure since the tutorial wonât be finished for a while
here is the tutorial for V3
V3 is out!
make sure to tell me if you have any problems with the module at all
Instead of calling functions to return simple numbers (like eulerâs number, golden ratio, etc) you should store these in your modules table.
Like so:
local myModule = {}
myModule.GoldenRatio = 1.6180339887499
-- do stuff
return myModule
As well as this, the module itself is incredibly hard to read.
(Also I noticed in your tutorial that you were defining the math
global as your module, which is a bad idea)
this ignores the class properties
also you can easily change the math variable itâs not hard at all
Do you mind elaborating, I havenât quite read through your documentation as it is hard to read.
I know but it encourages smaller and less experienced developers to follow suit.
I donât have a hard time reading it
I literally shows each class and each function
in the beginning of each script it shows what the class does
if you are going to say itâs hard to understand then tell me ways to improve it
it doesnât mess up the math functions at all though
I donât see a problem
- V4 shouldnât add too many more functions but should make the code way more readable(wouldnât take as long)
- V4 should add a lot more functions and make it more readable(would take longer)
0 voters
V4 is finished(in studio, not uploaded), I ended up completely reworking everything in the module to make it super clean
I also took the existing code and made it even shorter
V4 is not out yet and I will be making an updated tutorial
btw I decided to not add any extra functions into the module, all I did was improve the already existing code and made it way more readable.
I will post V4 when I finish the tutorial and things irl, thank you for reading and waiting
I am getting back from vacation July 4th, however V4 will not be worked on because Iâm going to try and get a huge update done for a game Iâm working on
also both CrazTrail and MathModule will be given a new post and a new name when they get to their next version which will be worked on after that huge update
EDIT: fixed the hyperlinks
It does not ignore the âclass propertiesâ.
Inside of the table being returned in the module, you have various tables which contain functions. It would be a good thing to simply store the numbers as âpropertiesâ in the Value
table, it does not make things more confusing given the users of the module look at the documentation properly.
Furthermore, there is a problem with some of the Value
functions, and that would be that you are calculating a constant value inside some of the methods upon each invocation of the method. This is unnecessary, and if you really insist upon not having number properties inside of the Value
table then you should at least store the numbers as constants and return them in the appropriate Value
method.
Also, I would suggest splitting up the different tables (i.e. Chance, Check, etc.) into different modules for the sake of organisation, and then you could return a table containing the required modules in MathModule
.
Finally, and this is mostly just nit-picking, I would advise spacing out your code to make it more readable. If someone wants to modify the module for personal use then that would be hard to with the current state of the module, since there is practically no spacing between each function.
yea I realize that now
thanks for the advice
yea I already did a lot of organizing with the module, only thing I didnât do yet was space out the code in the modules
either way Iâll have to work on this after my game update so there wonât be updates on the module any time soon
Iâve been looking around for Jaro Similarity algorithms and happened to stumble upon your implementation within the math lib. Now, although it does achieve the goal, I found quite a few issues - mostly pertaining to code coherence and readability, as well as the usage of while loops within the algorithm which makes it a bit harder to benchmark.
Shortly said, I decided to re-create the implementation and after a few hours of transpilation and help from my colleagues I came up with this: GitHub - KhanPython/Jaro-Similarity: LuaU Jaro Similarity and Jaro Winkler Implementation
Feel free to use! (Perhaps an addition for your V4)