Garry's Mod

Garry's Mod

42 个评价
Basic Advanced Calculator by RandomTNT (Abandoned)
   
奖励
收藏
已收藏
取消收藏
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Fun
文件大小
发表于
更新日期
53.216 KB
2017 年 6 月 11 日 上午 1:44
2020 年 8 月 23 日 上午 12:04
11 项改动说明 ( 查看 )

订阅以下载
Basic Advanced Calculator by RandomTNT (Abandoned)

描述
New functions:

Integral("var","str",a,b,n)
where var is the variable to respect, str being the Lua string to evaluate, a for min, b for max and n for strips.
Example: Integral("X","math.abs(X^2+4*X)",1,6,4)

Graph("var","str",min,max)
where var is the variable to change, str being the Lua string to evaluate, min and max for min-x and max-x, respectively.

This project is now dead until more ideas arrive to my head permanently. I'd rather make a sequel rather than try to untangle old spaghetti code.

-------

A simple project that turned unnecessarily complex by my own desire to program stuff.

It was supposed to be just a basic calculator for my programming needs, like calculating the base-1.1 log of 10^6, until it got complex, up to the point where it can now manipulate vectors. Why I did this to myself is still a rather unanswered question...

It functions about the same as your standard scientific calculator, with a few benefits:
- way more variables, from A-Z.
- number rounding, up to a certain number of digits, number flooring and ceiling.
- highly customizable colours and buttons.
- slight amount of string and table manipulation, alongside addtional vector and logic processing.
- clientside RunString function. Removed after pictures were taken.

However, due to the lack of my programming skills, it comes with a couple of caveats:
- not all functions on the scientific calculator are implemented.
- variable values need to be saved with SavVars to be stored between sessions.
- the rootX,Y function needs to be typed as "root(X,Y)" for "X root Y".
- the factorial function needs to be typed as "fact(n)" for "n!".
- the equals sign should only be used inside tables, use Store to store objects into variables.
- bracket auto-correction only works for brackets, not square brackets nor quotation marks.
- auto-correction fails sometimes, use NoAuto to disable/enable it.
- fails to identify sin(180 degrees) as 0.
- uses Simpson's Rule to estimate integrals, and could therefore be wrong.
- only single-letter variables can be stored properly. Variables with more than one letter involved are only local to that session, and might overwrite something on the client if a similarly named variable exists.

Simply open your Context Menu (default C) and click on the 'Calculator' icon, or type 'advcalc' in console to open it.



Please send me any suggestions to improve the UI. Any other suggestions/bug reports are also welcome, but don't expect me to perform and/or read all of them, as I am a really slow coder.
15 条留言
McFeddle 2022 年 12 月 2 日 下午 7:23 
Hello. This helped me pass school.
gm_flatgrass 2019 年 5 月 24 日 下午 1:46 
i dont know XD
i try
Piengineer12  [作者] 2019 年 5 月 23 日 上午 5:43 
And... How is that related to this?
gm_flatgrass 2019 年 5 月 18 日 下午 2:52 
/\
l l
\/
l this is the gballons there ruiling steam bc they never get use
Piengineer12  [作者] 2019 年 4 月 12 日 下午 8:29 
The 2nd argument requires a Lua string. This addon is quite old so I don't know if I can fix it.
TromboneBoi9 2019 年 4 月 12 日 下午 7:58 
The graph doesn't work, maybe I don't get it.
IntellectualPotato 2019 年 2 月 18 日 下午 4:11 
hmmm..."basic advanced" seems legit
[G-Pro] F0x 2019 年 2 月 6 日 上午 8:57 
Awesome, numpad support would be great !
Cheese Gaming 2018 年 7 月 21 日 上午 10:37 
awesome:steamhappy:
Gigsuki浪人 2018 年 7 月 3 日 上午 6:11 
I don't think "Basic" and "Advanced" can be used in the same sentence