@tlua/gmod 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/package.json +1 -1
  2. package/types/achievementicon.d.tlua +0 -1
  3. package/types/achievements.d.tlua +0 -31
  4. package/types/ai.d.tlua +0 -11
  5. package/types/ai_schedule.d.tlua +0 -1
  6. package/types/ai_task.d.tlua +0 -1
  7. package/types/angle.d.tlua +0 -37
  8. package/types/avatarimage.d.tlua +0 -1
  9. package/types/awesomium.d.tlua +0 -1
  10. package/types/baseclass.d.tlua +0 -4
  11. package/types/bf_read.d.tlua +0 -23
  12. package/types/bit.d.tlua +0 -23
  13. package/types/button.d.tlua +0 -1
  14. package/types/cam.d.tlua +0 -33
  15. package/types/ceffectdata.d.tlua +0 -65
  16. package/types/chat.d.tlua +0 -11
  17. package/types/checkbutton.d.tlua +0 -1
  18. package/types/cleanup.d.tlua +0 -15
  19. package/types/cluaemitter.d.tlua +0 -25
  20. package/types/clualocomotion.d.tlua +0 -81
  21. package/types/cluaparticle.d.tlua +0 -89
  22. package/types/cmovedata.d.tlua +0 -95
  23. package/types/cnavarea.d.tlua +0 -155
  24. package/types/cnavladder.d.tlua +0 -45
  25. package/types/cnewparticleeffect.d.tlua +0 -53
  26. package/types/color.d.tlua +0 -57
  27. package/types/concommand.d.tlua +0 -9
  28. package/types/constraint.d.tlua +0 -57
  29. package/types/construct.d.tlua +0 -3
  30. package/types/contentheader.d.tlua +1 -6
  31. package/types/contenticon.d.tlua +1 -18
  32. package/types/contentsidebar.d.tlua +1 -8
  33. package/types/contentsidebartoolbox.d.tlua +0 -1
  34. package/types/contextbase.d.tlua +1 -8
  35. package/types/controlpanel.d.tlua +6 -31
  36. package/types/controlpresets.d.tlua +1 -26
  37. package/types/convar.d.tlua +0 -33
  38. package/types/cookie.d.tlua +0 -7
  39. package/types/coroutine.d.tlua +0 -15
  40. package/types/crecipientfilter.d.tlua +0 -33
  41. package/types/csent.d.tlua +0 -1
  42. package/types/csoundpatch.d.tlua +0 -29
  43. package/types/ctakedamageinfo.d.tlua +0 -67
  44. package/types/ctrllistbox.d.tlua +0 -1
  45. package/types/ctrlnumpad.d.tlua +0 -13
  46. package/types/cusercmd.d.tlua +0 -55
  47. package/types/custom_entity_fields.d.tlua +0 -1
  48. package/types/cvars.d.tlua +0 -13
  49. package/types/dadjustablemodelpanel.d.tlua +1 -14
  50. package/types/dalphabar.d.tlua +1 -6
  51. package/types/dbinder.d.tlua +1 -8
  52. package/types/dbubblecontainer.d.tlua +1 -4
  53. package/types/dbutton.d.tlua +1 -16
  54. package/types/dcategoryheader.d.tlua +0 -1
  55. package/types/dcategorylist.d.tlua +0 -1
  56. package/types/dcheckbox.d.tlua +1 -10
  57. package/types/dcheckboxlabel.d.tlua +0 -19
  58. package/types/dcollapsiblecategory.d.tlua +1 -46
  59. package/types/dcolorbutton.d.tlua +1 -14
  60. package/types/dcolorcombo.d.tlua +1 -10
  61. package/types/dcolorcube.d.tlua +1 -26
  62. package/types/dcolormixer.d.tlua +1 -54
  63. package/types/dcolorpalette.d.tlua +1 -46
  64. package/types/dcolumnsheet.d.tlua +1 -10
  65. package/types/dcombobox.d.tlua +1 -34
  66. package/types/ddragbase.d.tlua +1 -26
  67. package/types/ddrawer.d.tlua +1 -16
  68. package/types/debug.d.tlua +25 -60
  69. package/types/debugoverlay.d.tlua +0 -23
  70. package/types/dentityproperties.d.tlua +1 -10
  71. package/types/derma.d.tlua +0 -21
  72. package/types/dexpandbutton.d.tlua +1 -6
  73. package/types/dfilebrowser.d.tlua +0 -41
  74. package/types/dform.d.tlua +1 -36
  75. package/types/dframe.d.tlua +0 -49
  76. package/types/dgrid.d.tlua +1 -22
  77. package/types/dhorizontaldivider.d.tlua +1 -40
  78. package/types/dhorizontalscroller.d.tlua +1 -22
  79. package/types/dhscrollbar.d.tlua +1 -22
  80. package/types/dhtml.d.tlua +1 -16
  81. package/types/dhtmlcontrols.d.tlua +0 -11
  82. package/types/diconbrowser.d.tlua +1 -22
  83. package/types/diconlayout.d.tlua +1 -36
  84. package/types/dimage.d.tlua +1 -39
  85. package/types/dimagebutton.d.tlua +0 -19
  86. package/types/dkillicon.d.tlua +0 -1
  87. package/types/dlabel.d.tlua +1 -66
  88. package/types/dlabeleditable.d.tlua +1 -10
  89. package/types/dlabelurl.d.tlua +1 -20
  90. package/types/dlistbox.d.tlua +1 -16
  91. package/types/dlistboxitem.d.tlua +1 -8
  92. package/types/dlistlayout.d.tlua +0 -1
  93. package/types/dlistview.d.tlua +1 -68
  94. package/types/dlistview_column.d.tlua +1 -28
  95. package/types/dlistview_columnplain.d.tlua +0 -1
  96. package/types/dlistview_draggerbar.d.tlua +0 -1
  97. package/types/dlistview_line.d.tlua +1 -26
  98. package/types/dlistviewheaderlabel.d.tlua +0 -1
  99. package/types/dlistviewlabel.d.tlua +0 -1
  100. package/types/dlistviewline.d.tlua +0 -1
  101. package/types/dmenu.d.tlua +1 -53
  102. package/types/dmenubar.d.tlua +1 -11
  103. package/types/dmenuoption.d.tlua +1 -26
  104. package/types/dmenuoptioncvar.d.tlua +1 -12
  105. package/types/dmodelpanel.d.tlua +1 -44
  106. package/types/dmodelselect.d.tlua +1 -4
  107. package/types/dmodelselectmulti.d.tlua +1 -4
  108. package/types/dnotify.d.tlua +1 -20
  109. package/types/dnumberscratch.d.tlua +1 -52
  110. package/types/dnumberwang.d.tlua +1 -32
  111. package/types/dnumpad.d.tlua +0 -1
  112. package/types/dnumslider.d.tlua +0 -35
  113. package/types/dpanel.d.tlua +1 -28
  114. package/types/dpanellist.d.tlua +0 -23
  115. package/types/dpaneloverlay.d.tlua +1 -14
  116. package/types/dpanelselect.d.tlua +0 -1
  117. package/types/dpanpanel.d.tlua +1 -12
  118. package/types/dprogress.d.tlua +1 -6
  119. package/types/dproperties.d.tlua +1 -8
  120. package/types/dproperty_boolean.d.tlua +0 -1
  121. package/types/dproperty_combo.d.tlua +1 -6
  122. package/types/dproperty_entity.d.tlua +0 -1
  123. package/types/dproperty_float.d.tlua +0 -1
  124. package/types/dproperty_generic.d.tlua +1 -10
  125. package/types/dproperty_int.d.tlua +0 -1
  126. package/types/dproperty_vectorcolor.d.tlua +0 -1
  127. package/types/dpropertysheet.d.tlua +9 -41
  128. package/types/dragndrop.d.tlua +0 -21
  129. package/types/draw.d.tlua +0 -22
  130. package/types/drgbpicker.d.tlua +1 -8
  131. package/types/drive.d.tlua +6 -31
  132. package/types/dscrollbargrip.d.tlua +0 -1
  133. package/types/dscrollpanel.d.tlua +0 -21
  134. package/types/dshape.d.tlua +1 -14
  135. package/types/dsizetocontents.d.tlua +1 -10
  136. package/types/dslider.d.tlua +1 -56
  137. package/types/dsprite.d.tlua +1 -18
  138. package/types/dtab.d.tlua +1 -16
  139. package/types/dtextentry.d.tlua +1 -86
  140. package/types/dtilelayout.d.tlua +1 -42
  141. package/types/dtooltip.d.tlua +1 -12
  142. package/types/dtree.d.tlua +1 -32
  143. package/types/dtree_node.d.tlua +1 -136
  144. package/types/dtree_node_button.d.tlua +0 -1
  145. package/types/duplicator.d.tlua +0 -60
  146. package/types/dverticaldivider.d.tlua +1 -46
  147. package/types/dvscrollbar.d.tlua +1 -22
  148. package/types/editablepanel.d.tlua +0 -1
  149. package/types/effect.d.tlua +1 -8
  150. package/types/effects.d.tlua +0 -13
  151. package/types/engine.d.tlua +0 -43
  152. package/types/entity.d.tlua +2 -1319
  153. package/types/ents.d.tlua +0 -44
  154. package/types/enums.d.tlua +0 -1
  155. package/types/file.d.tlua +0 -79
  156. package/types/file_class.d.tlua +0 -1
  157. package/types/fingerposer.d.tlua +0 -1
  158. package/types/fingervar.d.tlua +0 -1
  159. package/types/frame.d.tlua +0 -1
  160. package/types/frame_blend.d.tlua +0 -15
  161. package/types/game.d.tlua +0 -79
  162. package/types/gameevent.d.tlua +4 -9
  163. package/types/gamemode.d.tlua +0 -6
  164. package/types/global.d.tlua +0 -18
  165. package/types/gm.d.tlua +0 -535
  166. package/types/gmod.d.tlua +0 -1
  167. package/types/gmsave.d.tlua +0 -9
  168. package/types/gui.d.tlua +0 -43
  169. package/types/gwen.d.tlua +0 -7
  170. package/types/halo.d.tlua +0 -5
  171. package/types/hammer.d.tlua +0 -1
  172. package/types/hook.d.tlua +0 -9
  173. package/types/html.d.tlua +0 -1
  174. package/types/http.d.tlua +0 -3
  175. package/types/iconeditor.d.tlua +1 -22
  176. package/types/igmodaudiochannel.d.tlua +0 -83
  177. package/types/imagecheckbox.d.tlua +1 -8
  178. package/types/imaterial.d.tlua +0 -53
  179. package/types/imesh.d.tlua +0 -11
  180. package/types/input.d.tlua +0 -47
  181. package/types/invalidateinternalentitycache.d.tlua +0 -1
  182. package/types/irestore.d.tlua +0 -19
  183. package/types/isave.d.tlua +0 -19
  184. package/types/itexture.d.tlua +0 -21
  185. package/types/ivideowriter.d.tlua +0 -11
  186. package/types/jit.d.tlua +9 -42
  187. package/types/killicon.d.tlua +0 -15
  188. package/types/label.d.tlua +0 -1
  189. package/types/language.d.tlua +0 -3
  190. package/types/list.d.tlua +0 -17
  191. package/types/makeballoon.d.tlua +0 -1
  192. package/types/markup.d.tlua +0 -5
  193. package/types/markupobject.d.tlua +0 -11
  194. package/types/material.d.tlua +0 -1
  195. package/types/math.d.tlua +200 -371
  196. package/types/matproxy.d.tlua +0 -7
  197. package/types/matselect.d.tlua +1 -22
  198. package/types/menu.d.tlua +0 -1
  199. package/types/menubar.d.tlua +0 -5
  200. package/types/mesh.d.tlua +0 -39
  201. package/types/modelimage.d.tlua +0 -1
  202. package/types/motionsensor.d.tlua +0 -21
  203. package/types/navmesh.d.tlua +0 -53
  204. package/types/net.d.tlua +0 -104
  205. package/types/nextbot.d.tlua +10 -83
  206. package/types/notification.d.tlua +0 -5
  207. package/types/npc.d.tlua +1 -364
  208. package/types/numpad.d.tlua +0 -15
  209. package/types/os.d.tlua +0 -8
  210. package/types/package.d.tlua +0 -1
  211. package/types/panel.d.tlua +2 -662
  212. package/types/panellist.d.tlua +0 -1
  213. package/types/pathfollower.d.tlua +0 -63
  214. package/types/permissions.d.tlua +0 -13
  215. package/types/physcollide.d.tlua +0 -7
  216. package/types/physenv.d.tlua +0 -23
  217. package/types/physobj.d.tlua +0 -157
  218. package/types/pixelvis_handle_t.d.tlua +0 -1
  219. package/types/player.d.tlua +11 -594
  220. package/types/player_manager.d.tlua +0 -27
  221. package/types/preseteditor.d.tlua +0 -1
  222. package/types/presets.d.tlua +0 -13
  223. package/types/projectedtexture.d.tlua +0 -97
  224. package/types/properties.d.tlua +0 -11
  225. package/types/propselect.d.tlua +1 -10
  226. package/types/radiobutton.d.tlua +0 -1
  227. package/types/render.d.tlua +0 -285
  228. package/types/resource.d.tlua +0 -5
  229. package/types/richtext.d.tlua +0 -1
  230. package/types/sandbox.d.tlua +1 -108
  231. package/types/saverestore.d.tlua +0 -25
  232. package/types/schedule.d.tlua +0 -13
  233. package/types/scripted_ents.d.tlua +0 -21
  234. package/types/search.d.tlua +0 -3
  235. package/types/serverlist.d.tlua +0 -15
  236. package/types/slidebar.d.tlua +0 -1
  237. package/types/slider.d.tlua +0 -1
  238. package/types/sound.d.tlua +0 -21
  239. package/types/spawnicon.d.tlua +1 -16
  240. package/types/spawnmenu.d.tlua +0 -48
  241. package/types/spawnmenucontentpanel.d.tlua +1 -10
  242. package/types/sql.d.tlua +0 -19
  243. package/types/stack.d.tlua +0 -11
  244. package/types/steamworks.d.tlua +0 -37
  245. package/types/string.d.tlua +0 -96
  246. package/types/structures.d.tlua +0 -7
  247. package/types/surface.d.tlua +0 -69
  248. package/types/surfaceinfo.d.tlua +0 -11
  249. package/types/system.d.tlua +0 -21
  250. package/types/table.d.tlua +0 -93
  251. package/types/task.d.tlua +0 -19
  252. package/types/team.d.tlua +0 -39
  253. package/types/textentry.d.tlua +0 -1
  254. package/types/tgaimage.d.tlua +0 -1
  255. package/types/timer.d.tlua +0 -29
  256. package/types/tool.d.tlua +1 -90
  257. package/types/ugcpublishwindow.d.tlua +1 -18
  258. package/types/umsg.d.tlua +0 -25
  259. package/types/undo.d.tlua +0 -21
  260. package/types/urllabel.d.tlua +0 -1
  261. package/types/usermessage.d.tlua +0 -5
  262. package/types/utf8.d.tlua +0 -15
  263. package/types/util.d.tlua +0 -185
  264. package/types/vector.d.tlua +0 -73
  265. package/types/vehicle.d.tlua +2 -102
  266. package/types/vgui.d.tlua +0 -33
  267. package/types/video.d.tlua +0 -1
  268. package/types/vmatrix.d.tlua +0 -71
  269. package/types/weapon.d.tlua +2 -168
  270. package/types/weapons.d.tlua +0 -12
  271. package/types/widgets.d.tlua +0 -3
  272. package/types/workshopfilebase.d.tlua +0 -11
package/types/math.d.tlua CHANGED
@@ -40,31 +40,21 @@
40
40
  */
41
41
  interface MathLib {
42
42
  ease: MatheaseLib;
43
- }
44
43
 
45
- /**
46
- * The math library is a standard Lua library that provides functions for manipulating numbers. In Garry's Mod several additional math functions have been added.
47
- * @source https://wiki.facepunch.com/gmod/math
48
- */
49
- interface MathLib {
50
44
  /**
51
45
  * Calculates the difference between two angles.
52
46
  * @realm shared and menu
53
47
  * @source https://wiki.facepunch.com/gmod/math.AngleDifference
54
48
  */
55
49
  AngleDifference(a: number, b: number): number;
56
- }
57
50
 
58
- interface MathLib {
59
51
  /**
60
52
  * Gradually approaches the target value by the specified amount.
61
53
  * @realm shared and menu
62
54
  * @source https://wiki.facepunch.com/gmod/math.Approach
63
55
  */
64
56
  Approach(current: number, target: number, change: number): number;
65
- }
66
57
 
67
- interface MathLib {
68
58
  /**
69
59
  * Increments an angle towards another by specified rate.
70
60
  *
@@ -75,45 +65,35 @@ interface MathLib {
75
65
  * @source https://wiki.facepunch.com/gmod/math.ApproachAngle
76
66
  */
77
67
  ApproachAngle(currentAngle: number, targetAngle: number, rate: number): number;
78
- }
79
68
 
80
- interface MathLib {
81
69
  /**
82
70
  * Basic code for Bézier-Spline algorithm.
83
71
  * @realm shared and menu
84
72
  * @source https://wiki.facepunch.com/gmod/math.BSplinePoint
85
73
  */
86
74
  BSplinePoint(fraction: number, points: table, fractionMax: number): Vector;
87
- }
88
75
 
89
- interface MathLib {
90
76
  /**
91
77
  * Converts a binary string into a number.
92
78
  * @realm shared and menu
93
79
  * @source https://wiki.facepunch.com/gmod/math.BinToInt
94
80
  */
95
81
  BinToInt(string: string): number;
96
- }
97
82
 
98
- interface MathLib {
99
83
  /**
100
84
  * Cubic Hermite spline algorithm.
101
85
  * @realm shared and menu
102
86
  * @source https://wiki.facepunch.com/gmod/math.CHSpline
103
87
  */
104
88
  CHSpline(frac: number, point0: Vector, tan0: Vector, point1: Vector, tan1: Vector): Vector;
105
- }
106
89
 
107
- interface MathLib {
108
90
  /**
109
91
  * Clamps a number between a minimum and maximum value.
110
92
  * @realm shared and menu
111
93
  * @source https://wiki.facepunch.com/gmod/math.Clamp
112
94
  */
113
95
  Clamp(input: number, min: number, max: number): number;
114
- }
115
96
 
116
- interface MathLib {
117
97
  /**
118
98
  * Lerp point between 4 control points with cubic bezier.
119
99
  *
@@ -123,9 +103,7 @@ interface MathLib {
123
103
  * @source https://wiki.facepunch.com/gmod/math.CubicBezier
124
104
  */
125
105
  CubicBezier(frac: number, p0: Vector, p1: Vector, p2: Vector, p3: Vector): Vector;
126
- }
127
106
 
128
- interface MathLib {
129
107
  /**
130
108
  * Returns the difference between two points in 2D space. Alias of [math.Distance](https://wiki.facepunch.com/gmod/math.Distance).
131
109
  *
@@ -134,18 +112,14 @@ interface MathLib {
134
112
  * @deprecated You should use math.Distance instead
135
113
  */
136
114
  Dist(x1: number, y1: number, x2: number, y2: number): number;
137
- }
138
115
 
139
- interface MathLib {
140
116
  /**
141
117
  * Returns the difference between two points in 2D space.
142
118
  * @realm shared and menu
143
119
  * @source https://wiki.facepunch.com/gmod/math.Distance
144
120
  */
145
121
  Distance(x1: number, y1: number, x2: number, y2: number): number;
146
- }
147
122
 
148
- interface MathLib {
149
123
  /**
150
124
  * Returns the squared difference between two points in 2D space. This is computationally faster than [math.Distance](https://wiki.facepunch.com/gmod/math.Distance).
151
125
  *
@@ -153,36 +127,28 @@ interface MathLib {
153
127
  * @source https://wiki.facepunch.com/gmod/math.DistanceSqr
154
128
  */
155
129
  DistanceSqr(x1: number, y1: number, x2: number, y2: number): number;
156
- }
157
130
 
158
- interface MathLib {
159
131
  /**
160
132
  * Calculates the progress of a value fraction, taking in to account given easing fractions
161
133
  * @realm shared and menu
162
134
  * @source https://wiki.facepunch.com/gmod/math.EaseInOut
163
135
  */
164
136
  EaseInOut(progress: number, easeIn?: number, easeOut?: number): number;
165
- }
166
137
 
167
- interface MathLib {
168
138
  /**
169
139
  * Simple function that calculates [factorial](https://en.wikipedia.org/wiki/Factorial) of a whole number.
170
140
  * @realm shared and menu
171
141
  * @source https://wiki.facepunch.com/gmod/math.Factorial
172
142
  */
173
143
  Factorial(val_in: number): number;
174
- }
175
144
 
176
- interface MathLib {
177
145
  /**
178
146
  * Converts an integer to a binary (base-2) string.
179
147
  * @realm shared and menu
180
148
  * @source https://wiki.facepunch.com/gmod/math.IntToBin
181
149
  */
182
150
  IntToBin(int: number): string;
183
- }
184
151
 
185
- interface MathLib {
186
152
  /**
187
153
  * Checks if two floating point numbers are nearly equal.
188
154
  *
@@ -193,18 +159,14 @@ interface MathLib {
193
159
  * @source https://wiki.facepunch.com/gmod/math.IsNearlyEqual
194
160
  */
195
161
  IsNearlyEqual(a: number, b: number, tolerance?: number): boolean;
196
- }
197
162
 
198
- interface MathLib {
199
163
  /**
200
164
  * Normalizes angle, so it returns value between -180 and 180.
201
165
  * @realm shared and menu
202
166
  * @source https://wiki.facepunch.com/gmod/math.NormalizeAngle
203
167
  */
204
168
  NormalizeAngle(angle: number): number;
205
- }
206
169
 
207
- interface MathLib {
208
170
  /**
209
171
  * Lerp point between 3 control points with quadratic bezier.
210
172
  *
@@ -214,9 +176,7 @@ interface MathLib {
214
176
  * @source https://wiki.facepunch.com/gmod/math.QuadraticBezier
215
177
  */
216
178
  QuadraticBezier(frac: number, p0: Vector, p1: Vector, p2: Vector): Vector;
217
- }
218
179
 
219
- interface MathLib {
220
180
  /**
221
181
  * Returns a random float between min and max.
222
182
  *
@@ -226,27 +186,21 @@ interface MathLib {
226
186
  * @source https://wiki.facepunch.com/gmod/math.Rand
227
187
  */
228
188
  Rand(min: number, max: number): number;
229
- }
230
189
 
231
- interface MathLib {
232
190
  /**
233
191
  * Remaps the value from one range to another
234
192
  * @realm shared and menu
235
193
  * @source https://wiki.facepunch.com/gmod/math.Remap
236
194
  */
237
195
  Remap(value: number, inMin: number, inMax: number, outMin: number, outMax: number): number;
238
- }
239
196
 
240
- interface MathLib {
241
197
  /**
242
198
  * Rounds the given value to the nearest whole number or to the given decimal places.
243
199
  * @realm shared and menu
244
200
  * @source https://wiki.facepunch.com/gmod/math.Round
245
201
  */
246
202
  Round(value: number, decimals?: number): number;
247
- }
248
203
 
249
- interface MathLib {
250
204
  /**
251
205
  * Returns the mathematical negative/positive sign of the input number.
252
206
  *
@@ -254,72 +208,56 @@ interface MathLib {
254
208
  * @source https://wiki.facepunch.com/gmod/math.Sign
255
209
  */
256
210
  Sign(value: number): number;
257
- }
258
211
 
259
- interface MathLib {
260
212
  /**
261
213
  * Snaps a number to the closest multiplicative of given number. See also [Angle:SnapTo](https://wiki.facepunch.com/gmod/Angle:SnapTo).
262
214
  * @realm shared and menu
263
215
  * @source https://wiki.facepunch.com/gmod/math.SnapTo
264
216
  */
265
217
  SnapTo(input: number, snapTo: number): number;
266
- }
267
218
 
268
- interface MathLib {
269
219
  /**
270
220
  * Returns the fraction of where the current time is relative to the start and end times
271
221
  * @realm shared and menu
272
222
  * @source https://wiki.facepunch.com/gmod/math.TimeFraction
273
223
  */
274
224
  TimeFraction(start: number, _end: number, current: number): number;
275
- }
276
225
 
277
- interface MathLib {
278
226
  /**
279
227
  * Trim unwanted decimal places.
280
228
  * @realm shared and menu
281
229
  * @source https://wiki.facepunch.com/gmod/math.Truncate
282
230
  */
283
231
  Truncate(num: number, digits?: number): number;
284
- }
285
232
 
286
- interface MathLib {
287
233
  /**
288
234
  * Calculates the absolute value of a number (effectively removes any negative sign).
289
235
  * @realm shared and menu
290
236
  * @source https://wiki.facepunch.com/gmod/math.abs
291
237
  */
292
238
  abs(x: number): number;
293
- }
294
239
 
295
- interface MathLib {
296
240
  /**
297
241
  * Returns the [arccosine](https://en.wikipedia.org/wiki/Arccosine) of the given number.
298
242
  * @realm shared and menu
299
243
  * @source https://wiki.facepunch.com/gmod/math.acos
300
244
  */
301
245
  acos(cos: number): number;
302
- }
303
246
 
304
- interface MathLib {
305
247
  /**
306
248
  * Returns the [arcsine](https://en.wikipedia.org/wiki/Inverse_trigonometric_functions) of the given number.
307
249
  * @realm shared and menu
308
250
  * @source https://wiki.facepunch.com/gmod/math.asin
309
251
  */
310
252
  asin(normal: number): number;
311
- }
312
253
 
313
- interface MathLib {
314
254
  /**
315
255
  * Returns the [arctangent](https://en.wikipedia.org/wiki/Inverse_trigonometric_functions) of the given number.
316
256
  * @realm shared and menu
317
257
  * @source https://wiki.facepunch.com/gmod/math.atan
318
258
  */
319
259
  atan(normal: number): number;
320
- }
321
260
 
322
- interface MathLib {
323
261
  /**
324
262
  * functions like [math.atan](https://wiki.facepunch.com/gmod/math.atan)(y / x), except it also takes into account the quadrant of the angle and so doesn't have a limited range of output.
325
263
  *
@@ -330,9 +268,7 @@ interface MathLib {
330
268
  * @source https://wiki.facepunch.com/gmod/math.atan2
331
269
  */
332
270
  atan2(y: number, x: number): number;
333
- }
334
271
 
335
- interface MathLib {
336
272
  /**
337
273
  * **INTERNAL**: Use [math.BSplinePoint](https://wiki.facepunch.com/gmod/math.BSplinePoint) instead.
338
274
  *
@@ -343,9 +279,7 @@ interface MathLib {
343
279
  * @source https://wiki.facepunch.com/gmod/math.calcBSplineN
344
280
  */
345
281
  calcBSplineN(i: number, k: number, t: number, tinc: number): number;
346
- }
347
282
 
348
- interface MathLib {
349
283
  /**
350
284
  * Ceils or rounds a number up.
351
285
  *
@@ -354,546 +288,441 @@ interface MathLib {
354
288
  * @source https://wiki.facepunch.com/gmod/math.ceil
355
289
  */
356
290
  ceil(number: number): number;
357
- }
358
291
 
359
- interface MathLib {
360
292
  /**
361
293
  * Returns the [cosine](https://en.wikipedia.org/wiki/Trigonometric_functions#cos) of given angle.
362
294
  * @realm shared and menu
363
295
  * @source https://wiki.facepunch.com/gmod/math.cos
364
296
  */
365
297
  cos(number: number): number;
366
- }
367
298
 
368
- interface MathLib {
369
299
  /**
370
300
  * Returns the [hyperbolic cosine](https://en.wikipedia.org/wiki/Cosh_(mathematical_function)) of the given angle.
371
301
  * @realm shared and menu
372
302
  * @source https://wiki.facepunch.com/gmod/math.cosh
373
303
  */
374
304
  cosh(number: number): number;
375
- }
376
305
 
377
- interface MathLib {
378
306
  /**
379
307
  * Converts radians to degrees.
380
308
  * @realm shared and menu
381
309
  * @source https://wiki.facepunch.com/gmod/math.deg
382
310
  */
383
311
  deg(radians: number): number;
384
- }
385
312
 
386
- interface MatheaseLib {
387
313
  /**
388
- * Eases in by reversing the direction of the ease slightly before returning.
389
- * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
390
- *
391
- *
314
+ * Returns e to the power of the input.
392
315
  * @realm shared and menu
393
- * @source https://wiki.facepunch.com/gmod/math.ease.InBack
316
+ * @source https://wiki.facepunch.com/gmod/math.exp
394
317
  */
395
- InBack(fraction: number): number;
396
- }
318
+ exp(exponent: number): number;
397
319
 
398
- interface MatheaseLib {
399
320
  /**
400
- * Eases in like a bouncy ball.
401
- * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
402
- *
321
+ * Floors or rounds a number down.
403
322
  *
323
+ * See [math.ceil](https://wiki.facepunch.com/gmod/math.ceil) for the inverse of this function.
404
324
  * @realm shared and menu
405
- * @source https://wiki.facepunch.com/gmod/math.ease.InBounce
406
- */
407
- InBounce(fraction: number): number;
408
- }
409
-
410
- interface MatheaseLib {
411
- /**
412
- * Eases in using a circular function.
413
- * @realm shared and menu
414
- * @source https://wiki.facepunch.com/gmod/math.ease.InCirc
325
+ * @source https://wiki.facepunch.com/gmod/math.floor
415
326
  */
416
- InCirc(fraction: number): number;
417
- }
327
+ floor(number: number): number;
418
328
 
419
- interface MatheaseLib {
420
329
  /**
421
- * Eases in by cubing the fraction.
330
+ * Returns the modulus of the specified values.
331
+ *
332
+ * While this is similar to the `%` operator, **it will return a negative value if the first argument is negative**, whereas the % operator will return a **positive** value **even if the first operand is negative**.
333
+ *
334
+ * This function is also slower than the `%` operator.
335
+ *
422
336
  * @realm shared and menu
423
- * @source https://wiki.facepunch.com/gmod/math.ease.InCubic
337
+ * @source https://wiki.facepunch.com/gmod/math.fmod
424
338
  */
425
- InCubic(fraction: number): number;
426
- }
339
+ fmod(base: number, modulator: number): number;
427
340
 
428
- interface MatheaseLib {
429
341
  /**
430
- * Eases in like a rubber band.
431
- * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
342
+ * **Lua reference description**: Returns `m` and `e` such that `x = m2e`, `e` is an integer and the absolute value of `m` is in the range ((0.5, 1) (or zero when x is zero).
343
+ *
344
+ * Used to split the number value into a normalized fraction and an exponent. Two values are returned: the first is a multiplier in the range `1/2` (**inclusive**) to `1` (**exclusive**) and the second is an integer exponent.
432
345
  *
346
+ * The result is such that `x = m*2^e`.
433
347
  *
434
348
  * @realm shared and menu
435
- * @source https://wiki.facepunch.com/gmod/math.ease.InElastic
349
+ * @source https://wiki.facepunch.com/gmod/math.frexp
436
350
  */
437
- InElastic(fraction: number): number;
438
- }
351
+ frexp(x: number): (number, number);
439
352
 
440
- interface MatheaseLib {
441
353
  /**
442
- * Eases in using an exponential equation with a base of 2 and where the fraction is used in the exponent.
354
+ * Takes a normalised number and returns the floating point representation.
355
+ *
356
+ * Effectively it returns the result of `normalizedFraction * 2.0 ^ exponent`. [math.frexp](https://wiki.facepunch.com/gmod/math.frexp) is the opposite function.
357
+ *
443
358
  * @realm shared and menu
444
- * @source https://wiki.facepunch.com/gmod/math.ease.InExpo
359
+ * @source https://wiki.facepunch.com/gmod/math.ldexp
445
360
  */
446
- InExpo(fraction: number): number;
447
- }
361
+ ldexp(normalizedFraction: number, exponent: number): number;
448
362
 
449
- interface MatheaseLib {
450
363
  /**
451
- * Eases in and out by reversing the direction of the ease slightly before returning on both ends.
452
- * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
364
+ * With one argument, return the natural logarithm of x (to base e).
453
365
  *
366
+ * With two arguments, return the logarithm of x to the given base, calculated as log(x)/log(base).
454
367
  *
455
368
  * @realm shared and menu
456
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutBack
369
+ * @source https://wiki.facepunch.com/gmod/math.log
457
370
  */
458
- InOutBack(fraction: number): number;
459
- }
371
+ log(x: number, base?: number): number;
460
372
 
461
- interface MatheaseLib {
462
373
  /**
463
- * Eases in and out like a bouncy ball.
464
- * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
465
- *
466
- *
374
+ * Returns the base-10 logarithm of x. This is usually more accurate than math.log(x, 10).
467
375
  * @realm shared and menu
468
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutBounce
376
+ * @source https://wiki.facepunch.com/gmod/math.log10
469
377
  */
470
- InOutBounce(fraction: number): number;
471
- }
378
+ log10(x: number): number;
472
379
 
473
- interface MatheaseLib {
474
380
  /**
475
- * Eases in and out using a circular function.
381
+ * Returns the largest value of all arguments.
476
382
  * @realm shared and menu
477
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutCirc
383
+ * @source https://wiki.facepunch.com/gmod/math.max
478
384
  */
479
- InOutCirc(fraction: number): number;
480
- }
385
+ max(...: any): number;
481
386
 
482
- interface MatheaseLib {
483
387
  /**
484
- * Eases in and out by cubing the fraction.
388
+ * Returns the smallest value of all arguments.
485
389
  * @realm shared and menu
486
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutCubic
390
+ * @source https://wiki.facepunch.com/gmod/math.min
487
391
  */
488
- InOutCubic(fraction: number): number;
489
- }
392
+ min(...: any): number;
490
393
 
491
- interface MatheaseLib {
492
394
  /**
493
- * Eases in and out like a rubber band.
494
- * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
495
- *
395
+ * Returns the modulus of the specified values. Same as [math.fmod](https://wiki.facepunch.com/gmod/math.fmod).
496
396
  *
497
397
  * @realm shared and menu
498
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutElastic
398
+ * @source https://wiki.facepunch.com/gmod/math.mod
399
+ * @deprecated This is removed in Lua versions later than what GMod is currently using. You should use the % operator or math.fmod instead.
499
400
  */
500
- InOutElastic(fraction: number): number;
501
- }
401
+ mod(base: number, modulator: number): number;
502
402
 
503
- interface MatheaseLib {
504
403
  /**
505
- * Eases in and out using an exponential equation with a base of 2 and where the fraction is used in the exponent.
404
+ * Returns the integral and fractional component of the modulo operation.
506
405
  * @realm shared and menu
507
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutExpo
406
+ * @source https://wiki.facepunch.com/gmod/math.modf
508
407
  */
509
- InOutExpo(fraction: number): number;
510
- }
408
+ modf(base: number): (number, number);
511
409
 
512
- interface MatheaseLib {
513
410
  /**
514
- * Eases in and out by squaring the fraction.
411
+ * Returns x raised to the power y.
412
+ * In particular, math.pow(1.0, x) and math.pow(x, 0.0) always return 1.0, even when x is a zero or a [nan](https://wiki.facepunch.com/gmod/nan). If both x and y are finite, x is negative, and y is not an integer then math.pow(x, y) is undefined.
413
+ *
515
414
  * @realm shared and menu
516
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutQuad
415
+ * @source https://wiki.facepunch.com/gmod/math.pow
517
416
  */
518
- InOutQuad(fraction: number): number;
519
- }
417
+ pow(x: number, y: number): number;
520
418
 
521
- interface MatheaseLib {
522
419
  /**
523
- * Eases in and out by raising the fraction to the power of 4.
420
+ * Converts an angle in degrees to it's equivalent in radians.
524
421
  * @realm shared and menu
525
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutQuart
422
+ * @source https://wiki.facepunch.com/gmod/math.rad
526
423
  */
527
- InOutQuart(fraction: number): number;
528
- }
424
+ rad(degrees: number): number;
529
425
 
530
- interface MatheaseLib {
531
426
  /**
532
- * Eases in and out by raising the fraction to the power of 5.
427
+ * When called without arguments, returns a uniform pseudo-random real number in the range 0 to 1 which includes 0 but excludes 1.
428
+ *
429
+ * When called with an integer number m, returns a uniform pseudo-random integer in the range 1 to m inclusive.
430
+ *
431
+ * When called with two integer numbers m and n, returns a uniform pseudo-random integer in the range m to n inclusive.
432
+ *
433
+ * See also [math.Rand](https://wiki.facepunch.com/gmod/math.Rand)
434
+ *
533
435
  * @realm shared and menu
534
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutQuint
436
+ * @source https://wiki.facepunch.com/gmod/math.random
535
437
  */
536
- InOutQuint(fraction: number): number;
537
- }
438
+ random(m?: number, n?: number): number;
538
439
 
539
- interface MatheaseLib {
540
440
  /**
541
- * Eases in and out using [math.sin](https://wiki.facepunch.com/gmod/math.sin).
441
+ * Seeds the random number generator. The same seed will guarantee the same sequence of numbers each time with [math.random](https://wiki.facepunch.com/gmod/math.random).
442
+ *
443
+ * For shared random values across predicted realms, use [util.SharedRandom](https://wiki.facepunch.com/gmod/util.SharedRandom).
444
+ *
445
+ * **WARNING**: Usage of this function affects **ALL** random numbers in the game. This means that improper use (such as setting the seed to a static value that doesn't change with time) can negatively affect other addons or the base game.
446
+ *
447
+ * It is a good idea to set the seed back to at least something like [Global.SysTime](https://wiki.facepunch.com/gmod/Global.SysTime) in those cases.
448
+ *
449
+ *
542
450
  * @realm shared and menu
543
- * @source https://wiki.facepunch.com/gmod/math.ease.InOutSine
451
+ * @source https://wiki.facepunch.com/gmod/math.randomseed
544
452
  */
545
- InOutSine(fraction: number): number;
546
- }
453
+ randomseed(seed: number): void;
547
454
 
548
- interface MatheaseLib {
549
455
  /**
550
- * Eases in by squaring the fraction.
456
+ * Returns the [sine](https://en.wikipedia.org/wiki/Trigonometric_functions) of given angle.
551
457
  * @realm shared and menu
552
- * @source https://wiki.facepunch.com/gmod/math.ease.InQuad
458
+ * @source https://wiki.facepunch.com/gmod/math.sin
553
459
  */
554
- InQuad(fraction: number): number;
555
- }
460
+ sin(number: number): number;
556
461
 
557
- interface MatheaseLib {
558
462
  /**
559
- * Eases in by raising the fraction to the power of 4.
463
+ * Returns the [hyperbolic sine](https://en.wikipedia.org/wiki/Hyperbolic_functions) of the given angle.
560
464
  * @realm shared and menu
561
- * @source https://wiki.facepunch.com/gmod/math.ease.InQuart
465
+ * @source https://wiki.facepunch.com/gmod/math.sinh
562
466
  */
563
- InQuart(fraction: number): number;
564
- }
467
+ sinh(number: number): number;
565
468
 
566
- interface MatheaseLib {
567
469
  /**
568
- * Eases in by raising the fraction to the power of 5.
470
+ * Returns the square root of the number.
569
471
  * @realm shared and menu
570
- * @source https://wiki.facepunch.com/gmod/math.ease.InQuint
472
+ * @source https://wiki.facepunch.com/gmod/math.sqrt
571
473
  */
572
- InQuint(fraction: number): number;
573
- }
474
+ sqrt(value: number): number;
574
475
 
575
- interface MatheaseLib {
576
476
  /**
577
- * Eases in using [math.sin](https://wiki.facepunch.com/gmod/math.sin).
477
+ * Returns the tangent of the given angle.
578
478
  * @realm shared and menu
579
- * @source https://wiki.facepunch.com/gmod/math.ease.InSine
479
+ * @source https://wiki.facepunch.com/gmod/math.tan
580
480
  */
581
- InSine(fraction: number): number;
481
+ tan(value: number): number;
482
+
483
+ /**
484
+ * Returns the [hyperbolic tangent](https://en.wikipedia.org/wiki/Hyperbolic_functions) of the given number.
485
+ * @realm shared and menu
486
+ * @source https://wiki.facepunch.com/gmod/math.tanh
487
+ */
488
+ tanh(number: number): number;
582
489
  }
583
490
 
584
491
  interface MatheaseLib {
585
492
  /**
586
- * Eases out by reversing the direction of the ease slightly before finishing.
493
+ * Eases in by reversing the direction of the ease slightly before returning.
587
494
  * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
588
495
  *
589
496
  *
590
497
  * @realm shared and menu
591
- * @source https://wiki.facepunch.com/gmod/math.ease.OutBack
498
+ * @source https://wiki.facepunch.com/gmod/math.ease.InBack
592
499
  */
593
- OutBack(fraction: number): number;
594
- }
500
+ InBack(fraction: number): number;
595
501
 
596
- interface MatheaseLib {
597
502
  /**
598
- * Eases out like a bouncy ball.
503
+ * Eases in like a bouncy ball.
599
504
  * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
600
505
  *
601
506
  *
602
507
  * @realm shared and menu
603
- * @source https://wiki.facepunch.com/gmod/math.ease.OutBounce
508
+ * @source https://wiki.facepunch.com/gmod/math.ease.InBounce
604
509
  */
605
- OutBounce(fraction: number): number;
606
- }
510
+ InBounce(fraction: number): number;
607
511
 
608
- interface MatheaseLib {
609
512
  /**
610
- * Eases out using a circular function.
513
+ * Eases in using a circular function.
611
514
  * @realm shared and menu
612
- * @source https://wiki.facepunch.com/gmod/math.ease.OutCirc
515
+ * @source https://wiki.facepunch.com/gmod/math.ease.InCirc
613
516
  */
614
- OutCirc(fraction: number): number;
615
- }
517
+ InCirc(fraction: number): number;
616
518
 
617
- interface MatheaseLib {
618
519
  /**
619
- * Eases out by cubing the fraction.
520
+ * Eases in by cubing the fraction.
620
521
  * @realm shared and menu
621
- * @source https://wiki.facepunch.com/gmod/math.ease.OutCubic
522
+ * @source https://wiki.facepunch.com/gmod/math.ease.InCubic
622
523
  */
623
- OutCubic(fraction: number): number;
624
- }
524
+ InCubic(fraction: number): number;
625
525
 
626
- interface MatheaseLib {
627
526
  /**
628
- * Eases out like a rubber band.
527
+ * Eases in like a rubber band.
629
528
  * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
630
529
  *
631
530
  *
632
531
  * @realm shared and menu
633
- * @source https://wiki.facepunch.com/gmod/math.ease.OutElastic
532
+ * @source https://wiki.facepunch.com/gmod/math.ease.InElastic
634
533
  */
635
- OutElastic(fraction: number): number;
636
- }
534
+ InElastic(fraction: number): number;
637
535
 
638
- interface MatheaseLib {
639
536
  /**
640
- * Eases out using an exponential equation with a base of 2 and where the fraction is used in the exponent.
537
+ * Eases in using an exponential equation with a base of 2 and where the fraction is used in the exponent.
641
538
  * @realm shared and menu
642
- * @source https://wiki.facepunch.com/gmod/math.ease.OutExpo
539
+ * @source https://wiki.facepunch.com/gmod/math.ease.InExpo
643
540
  */
644
- OutExpo(fraction: number): number;
645
- }
541
+ InExpo(fraction: number): number;
646
542
 
647
- interface MatheaseLib {
648
543
  /**
649
- * Eases out by squaring the fraction.
544
+ * Eases in and out by reversing the direction of the ease slightly before returning on both ends.
545
+ * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
546
+ *
547
+ *
650
548
  * @realm shared and menu
651
- * @source https://wiki.facepunch.com/gmod/math.ease.OutQuad
549
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutBack
652
550
  */
653
- OutQuad(fraction: number): number;
654
- }
551
+ InOutBack(fraction: number): number;
655
552
 
656
- interface MatheaseLib {
657
553
  /**
658
- * Eases out by raising the fraction to the power of 4.
554
+ * Eases in and out like a bouncy ball.
555
+ * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
556
+ *
557
+ *
659
558
  * @realm shared and menu
660
- * @source https://wiki.facepunch.com/gmod/math.ease.OutQuart
559
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutBounce
661
560
  */
662
- OutQuart(fraction: number): number;
663
- }
561
+ InOutBounce(fraction: number): number;
664
562
 
665
- interface MatheaseLib {
666
563
  /**
667
- * Eases out by raising the fraction to the power of 5.
564
+ * Eases in and out using a circular function.
668
565
  * @realm shared and menu
669
- * @source https://wiki.facepunch.com/gmod/math.ease.OutQuint
566
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutCirc
670
567
  */
671
- OutQuint(fraction: number): number;
672
- }
568
+ InOutCirc(fraction: number): number;
673
569
 
674
- interface MatheaseLib {
675
570
  /**
676
- * Eases out using [math.sin](https://wiki.facepunch.com/gmod/math.sin).
571
+ * Eases in and out by cubing the fraction.
677
572
  * @realm shared and menu
678
- * @source https://wiki.facepunch.com/gmod/math.ease.OutSine
573
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutCubic
679
574
  */
680
- OutSine(fraction: number): number;
681
- }
575
+ InOutCubic(fraction: number): number;
682
576
 
683
- interface MathLib {
684
577
  /**
685
- * Returns e to the power of the input.
578
+ * Eases in and out like a rubber band.
579
+ * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
580
+ *
581
+ *
686
582
  * @realm shared and menu
687
- * @source https://wiki.facepunch.com/gmod/math.exp
583
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutElastic
688
584
  */
689
- exp(exponent: number): number;
690
- }
585
+ InOutElastic(fraction: number): number;
691
586
 
692
- interface MathLib {
693
587
  /**
694
- * Floors or rounds a number down.
695
- *
696
- * See [math.ceil](https://wiki.facepunch.com/gmod/math.ceil) for the inverse of this function.
588
+ * Eases in and out using an exponential equation with a base of 2 and where the fraction is used in the exponent.
697
589
  * @realm shared and menu
698
- * @source https://wiki.facepunch.com/gmod/math.floor
590
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutExpo
699
591
  */
700
- floor(number: number): number;
701
- }
592
+ InOutExpo(fraction: number): number;
702
593
 
703
- interface MathLib {
704
594
  /**
705
- * Returns the modulus of the specified values.
706
- *
707
- * While this is similar to the `%` operator, **it will return a negative value if the first argument is negative**, whereas the % operator will return a **positive** value **even if the first operand is negative**.
708
- *
709
- * This function is also slower than the `%` operator.
710
- *
595
+ * Eases in and out by squaring the fraction.
711
596
  * @realm shared and menu
712
- * @source https://wiki.facepunch.com/gmod/math.fmod
597
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutQuad
713
598
  */
714
- fmod(base: number, modulator: number): number;
715
- }
599
+ InOutQuad(fraction: number): number;
716
600
 
717
- interface MathLib {
718
601
  /**
719
- * **Lua reference description**: Returns `m` and `e` such that `x = m2e`, `e` is an integer and the absolute value of `m` is in the range ((0.5, 1) (or zero when x is zero).
720
- *
721
- * Used to split the number value into a normalized fraction and an exponent. Two values are returned: the first is a multiplier in the range `1/2` (**inclusive**) to `1` (**exclusive**) and the second is an integer exponent.
722
- *
723
- * The result is such that `x = m*2^e`.
724
- *
602
+ * Eases in and out by raising the fraction to the power of 4.
725
603
  * @realm shared and menu
726
- * @source https://wiki.facepunch.com/gmod/math.frexp
604
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutQuart
727
605
  */
728
- frexp(x: number): (number, number);
729
- }
606
+ InOutQuart(fraction: number): number;
730
607
 
731
- interface MathLib {
732
608
  /**
733
- * Takes a normalised number and returns the floating point representation.
734
- *
735
- * Effectively it returns the result of `normalizedFraction * 2.0 ^ exponent`. [math.frexp](https://wiki.facepunch.com/gmod/math.frexp) is the opposite function.
736
- *
609
+ * Eases in and out by raising the fraction to the power of 5.
737
610
  * @realm shared and menu
738
- * @source https://wiki.facepunch.com/gmod/math.ldexp
611
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutQuint
739
612
  */
740
- ldexp(normalizedFraction: number, exponent: number): number;
741
- }
613
+ InOutQuint(fraction: number): number;
742
614
 
743
- interface MathLib {
744
615
  /**
745
- * With one argument, return the natural logarithm of x (to base e).
746
- *
747
- * With two arguments, return the logarithm of x to the given base, calculated as log(x)/log(base).
748
- *
616
+ * Eases in and out using [math.sin](https://wiki.facepunch.com/gmod/math.sin).
749
617
  * @realm shared and menu
750
- * @source https://wiki.facepunch.com/gmod/math.log
618
+ * @source https://wiki.facepunch.com/gmod/math.ease.InOutSine
751
619
  */
752
- log(x: number, base?: number): number;
753
- }
620
+ InOutSine(fraction: number): number;
754
621
 
755
- interface MathLib {
756
622
  /**
757
- * Returns the base-10 logarithm of x. This is usually more accurate than math.log(x, 10).
623
+ * Eases in by squaring the fraction.
758
624
  * @realm shared and menu
759
- * @source https://wiki.facepunch.com/gmod/math.log10
625
+ * @source https://wiki.facepunch.com/gmod/math.ease.InQuad
760
626
  */
761
- log10(x: number): number;
762
- }
627
+ InQuad(fraction: number): number;
763
628
 
764
- interface MathLib {
765
629
  /**
766
- * Returns the largest value of all arguments.
630
+ * Eases in by raising the fraction to the power of 4.
767
631
  * @realm shared and menu
768
- * @source https://wiki.facepunch.com/gmod/math.max
632
+ * @source https://wiki.facepunch.com/gmod/math.ease.InQuart
769
633
  */
770
- max(...: any): number;
771
- }
634
+ InQuart(fraction: number): number;
772
635
 
773
- interface MathLib {
774
636
  /**
775
- * Returns the smallest value of all arguments.
637
+ * Eases in by raising the fraction to the power of 5.
776
638
  * @realm shared and menu
777
- * @source https://wiki.facepunch.com/gmod/math.min
639
+ * @source https://wiki.facepunch.com/gmod/math.ease.InQuint
778
640
  */
779
- min(...: any): number;
780
- }
641
+ InQuint(fraction: number): number;
781
642
 
782
- interface MathLib {
783
643
  /**
784
- * Returns the modulus of the specified values. Same as [math.fmod](https://wiki.facepunch.com/gmod/math.fmod).
785
- *
644
+ * Eases in using [math.sin](https://wiki.facepunch.com/gmod/math.sin).
786
645
  * @realm shared and menu
787
- * @source https://wiki.facepunch.com/gmod/math.mod
788
- * @deprecated This is removed in Lua versions later than what GMod is currently using. You should use the % operator or math.fmod instead.
646
+ * @source https://wiki.facepunch.com/gmod/math.ease.InSine
789
647
  */
790
- mod(base: number, modulator: number): number;
791
- }
648
+ InSine(fraction: number): number;
792
649
 
793
- interface MathLib {
794
650
  /**
795
- * Returns the integral and fractional component of the modulo operation.
651
+ * Eases out by reversing the direction of the ease slightly before finishing.
652
+ * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
653
+ *
654
+ *
796
655
  * @realm shared and menu
797
- * @source https://wiki.facepunch.com/gmod/math.modf
656
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutBack
798
657
  */
799
- modf(base: number): (number, number);
800
- }
658
+ OutBack(fraction: number): number;
801
659
 
802
- interface MathLib {
803
660
  /**
804
- * Returns x raised to the power y.
805
- * In particular, math.pow(1.0, x) and math.pow(x, 0.0) always return 1.0, even when x is a zero or a [nan](https://wiki.facepunch.com/gmod/nan). If both x and y are finite, x is negative, and y is not an integer then math.pow(x, y) is undefined.
661
+ * Eases out like a bouncy ball.
662
+ * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
663
+ *
806
664
  *
807
665
  * @realm shared and menu
808
- * @source https://wiki.facepunch.com/gmod/math.pow
666
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutBounce
809
667
  */
810
- pow(x: number, y: number): number;
811
- }
668
+ OutBounce(fraction: number): number;
812
669
 
813
- interface MathLib {
814
670
  /**
815
- * Converts an angle in degrees to it's equivalent in radians.
671
+ * Eases out using a circular function.
816
672
  * @realm shared and menu
817
- * @source https://wiki.facepunch.com/gmod/math.rad
673
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutCirc
818
674
  */
819
- rad(degrees: number): number;
820
- }
675
+ OutCirc(fraction: number): number;
821
676
 
822
- interface MathLib {
823
677
  /**
824
- * When called without arguments, returns a uniform pseudo-random real number in the range 0 to 1 which includes 0 but excludes 1.
825
- *
826
- * When called with an integer number m, returns a uniform pseudo-random integer in the range 1 to m inclusive.
827
- *
828
- * When called with two integer numbers m and n, returns a uniform pseudo-random integer in the range m to n inclusive.
829
- *
830
- * See also [math.Rand](https://wiki.facepunch.com/gmod/math.Rand)
831
- *
678
+ * Eases out by cubing the fraction.
832
679
  * @realm shared and menu
833
- * @source https://wiki.facepunch.com/gmod/math.random
680
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutCubic
834
681
  */
835
- random(m?: number, n?: number): number;
836
- }
682
+ OutCubic(fraction: number): number;
837
683
 
838
- interface MathLib {
839
684
  /**
840
- * Seeds the random number generator. The same seed will guarantee the same sequence of numbers each time with [math.random](https://wiki.facepunch.com/gmod/math.random).
841
- *
842
- * For shared random values across predicted realms, use [util.SharedRandom](https://wiki.facepunch.com/gmod/util.SharedRandom).
843
- *
844
- * **WARNING**: Usage of this function affects **ALL** random numbers in the game. This means that improper use (such as setting the seed to a static value that doesn't change with time) can negatively affect other addons or the base game.
845
- *
846
- * It is a good idea to set the seed back to at least something like [Global.SysTime](https://wiki.facepunch.com/gmod/Global.SysTime) in those cases.
685
+ * Eases out like a rubber band.
686
+ * **NOTE**: This doesn't work properly when used with [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) as it clamps the fraction between 0 and 1. Using your own version of [Global.Lerp](https://wiki.facepunch.com/gmod/Global.Lerp) that is unclamped would be necessary instead.
847
687
  *
848
688
  *
849
689
  * @realm shared and menu
850
- * @source https://wiki.facepunch.com/gmod/math.randomseed
690
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutElastic
851
691
  */
852
- randomseed(seed: number): void;
853
- }
692
+ OutElastic(fraction: number): number;
854
693
 
855
- interface MathLib {
856
694
  /**
857
- * Returns the [sine](https://en.wikipedia.org/wiki/Trigonometric_functions) of given angle.
695
+ * Eases out using an exponential equation with a base of 2 and where the fraction is used in the exponent.
858
696
  * @realm shared and menu
859
- * @source https://wiki.facepunch.com/gmod/math.sin
697
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutExpo
860
698
  */
861
- sin(number: number): number;
862
- }
699
+ OutExpo(fraction: number): number;
863
700
 
864
- interface MathLib {
865
701
  /**
866
- * Returns the [hyperbolic sine](https://en.wikipedia.org/wiki/Hyperbolic_functions) of the given angle.
702
+ * Eases out by squaring the fraction.
867
703
  * @realm shared and menu
868
- * @source https://wiki.facepunch.com/gmod/math.sinh
704
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutQuad
869
705
  */
870
- sinh(number: number): number;
871
- }
706
+ OutQuad(fraction: number): number;
872
707
 
873
- interface MathLib {
874
708
  /**
875
- * Returns the square root of the number.
709
+ * Eases out by raising the fraction to the power of 4.
876
710
  * @realm shared and menu
877
- * @source https://wiki.facepunch.com/gmod/math.sqrt
711
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutQuart
878
712
  */
879
- sqrt(value: number): number;
880
- }
713
+ OutQuart(fraction: number): number;
881
714
 
882
- interface MathLib {
883
715
  /**
884
- * Returns the tangent of the given angle.
716
+ * Eases out by raising the fraction to the power of 5.
885
717
  * @realm shared and menu
886
- * @source https://wiki.facepunch.com/gmod/math.tan
718
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutQuint
887
719
  */
888
- tan(value: number): number;
889
- }
720
+ OutQuint(fraction: number): number;
890
721
 
891
- interface MathLib {
892
722
  /**
893
- * Returns the [hyperbolic tangent](https://en.wikipedia.org/wiki/Hyperbolic_functions) of the given number.
723
+ * Eases out using [math.sin](https://wiki.facepunch.com/gmod/math.sin).
894
724
  * @realm shared and menu
895
- * @source https://wiki.facepunch.com/gmod/math.tanh
725
+ * @source https://wiki.facepunch.com/gmod/math.ease.OutSine
896
726
  */
897
- tanh(number: number): number;
727
+ OutSine(fraction: number): number;
898
728
  }
899
-