You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---@paramangle?any # An angle to use for the rotation, in radians.
97
+
---@paramax?number # The x component of the axis of rotation.
98
+
---@paramay?number # The y component of the axis of rotation.
99
+
---@paramaz?number # The z component of the axis of rotation.
100
+
---@paramraw?boolean # Whether the components should be interpreted as raw `(x, y, z, w)` components.
101
+
---@returnlovr.quat q # The new quaternion.
102
+
functionlovr.math.newQuat(angle, ax, ay, az, raw) end
80
103
81
104
---
82
105
---Creates a new `RandomGenerator`, which can be used to generate random numbers. If you just want some random numbers, you can use `lovr.math.random`. Individual RandomGenerator objects are useful if you need more control over the random sequence used or need a random generator isolated from other instances.
@@ -91,21 +114,37 @@ function lovr.math.newRandomGenerator() end
91
114
---
92
115
---This function takes the same arguments as `Vec2:set`.
93
116
---
94
-
functionlovr.math.newVec2() end
117
+
---@overloadfun(u: lovr.Vec2):lovr.Vec2
118
+
---@paramx?number # The x value of the vector.
119
+
---@paramy?number # The y value of the vector.
120
+
---@returnlovr.Vec2 v # The new vector.
121
+
functionlovr.math.newVec2(x, y) end
95
122
96
123
---
97
124
---Creates a new 3D vector.
98
125
---
99
126
---This function takes the same arguments as `Vec3:set`.
100
127
---
101
-
functionlovr.math.newVec3() end
128
+
---@overloadfun(u: lovr.Vec3):lovr.Vec3
129
+
---@overloadfun(m: lovr.Mat4):lovr.Vec3
130
+
---@paramx?number # The x value of the vector.
131
+
---@paramy?number # The y value of the vector.
132
+
---@paramz?number # The z value of the vector.
133
+
---@returnlovr.Vec3 v # The new vector.
134
+
functionlovr.math.newVec3(x, y, z) end
102
135
103
136
---
104
137
---Creates a new 4D vector.
105
138
---
106
139
---This function takes the same arguments as `Vec4:set`.
107
140
---
108
-
functionlovr.math.newVec4() end
141
+
---@overloadfun(u: lovr.Vec4):lovr.Vec4
142
+
---@paramx?number # The x value of the vector.
143
+
---@paramy?number # The y value of the vector.
144
+
---@paramz?number # The z value of the vector.
145
+
---@paramw?number # The w value of the vector.
146
+
---@returnlovr.Vec4 v # The new vector.
147
+
functionlovr.math.newVec4(x, y, z, w) end
109
148
110
149
---
111
150
---Returns a 1D, 2D, 3D, or 4D perlin noise value.
@@ -124,7 +163,18 @@ function lovr.math.noise(x) end
124
163
---
125
164
---This function takes the same arguments as `Quat:set`.
0 commit comments