@quenty/vector3utils 3.2.0 → 3.2.1-canary.238.2c4d310.0
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.
- package/CHANGELOG.md +8 -0
- package/LICENSE.md +1 -1
- package/README.md +2 -2
- package/package.json +4 -4
- package/src/Shared/RandomVector3Utils.lua +9 -5
- package/src/Shared/Vector3Utils.lua +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.2.1-canary.238.2c4d310.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/vector3utils@3.2.0...@quenty/vector3utils@3.2.1-canary.238.2c4d310.0) (2021-12-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/vector3utils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/vector3utils@3.1.1...@quenty/vector3utils@3.2.0) (2021-11-20)
|
|
7
15
|
|
|
8
16
|
|
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
## Vector3Utils
|
|
2
2
|
<div align="center">
|
|
3
|
-
<a href="http://quenty.github.io/
|
|
3
|
+
<a href="http://quenty.github.io/NevermoreEngine/">
|
|
4
4
|
<img src="https://img.shields.io/badge/docs-website-green.svg" alt="Documentation" />
|
|
5
5
|
</a>
|
|
6
6
|
<a href="https://discord.gg/mhtGUS8">
|
|
7
|
-
<img src="https://img.shields.io/
|
|
7
|
+
<img src="https://img.shields.io/discord/385151591524597761?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" />
|
|
8
8
|
</a>
|
|
9
9
|
<a href="https://github.com/Quenty/NevermoreEngine/actions">
|
|
10
10
|
<img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/build.yml/badge.svg" alt="Build and release status" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/vector3utils",
|
|
3
|
-
"version": "3.2.0",
|
|
3
|
+
"version": "3.2.1-canary.238.2c4d310.0",
|
|
4
4
|
"description": "Utilities involving Vector3 objects in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/loader": "
|
|
29
|
-
"@quenty/math": "
|
|
28
|
+
"@quenty/loader": "3.1.2-canary.238.2c4d310.0",
|
|
29
|
+
"@quenty/math": "2.0.1-canary.238.2c4d310.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "2c4d310b84afd0570d89667dc5d4aa69a0ef304a"
|
|
35
35
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
--[=[
|
|
2
|
+
Utility functions involving RandomVector3Utils
|
|
3
|
+
@class RandomVector3Utils
|
|
4
|
+
]=]
|
|
4
5
|
|
|
5
6
|
local RandomVector3Utils = {}
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
--[=[
|
|
9
|
+
Equal distribution unit vectors around a sphere
|
|
10
|
+
@return Vector3
|
|
11
|
+
]=]
|
|
8
12
|
function RandomVector3Utils.getRandomUnitVector()
|
|
9
13
|
local s = 2*(math.random()-0.5)
|
|
10
14
|
local t = 6.2831853071796*math.random()
|
|
@@ -12,7 +16,7 @@ function RandomVector3Utils.getRandomUnitVector()
|
|
|
12
16
|
local m = (1-s*s)^0.5
|
|
13
17
|
local ry = m*math.cos(t)
|
|
14
18
|
local rz = m*math.sin(t)
|
|
15
|
-
return Vector3.new(rx,ry,rz)
|
|
19
|
+
return Vector3.new(rx, ry, rz)
|
|
16
20
|
end
|
|
17
21
|
|
|
18
22
|
return RandomVector3Utils
|