Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 47 additions & 2 deletions generated/lua_keywords_pretty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -338,24 +338,69 @@ export type rotation = quaternion</string>
<key>value</key>
<string>PrimParamsSetterTypeMeta</string>
</map>
<key>math.e</key>
<map>
<key>tooltip</key>
<string>Base of the natural logarithm.</string>
<key>type</key>
<string>number</string>
<key>value</key>
<string>2.718281828459045</string>
</map>
<key>math.huge</key>
<map>
<key>tooltip</key>
<string>Value larger than any other numeric value (infinity).</string>
<string>Value larger than any other numeric value (infinity). 1/0.</string>
<key>type</key>
<string>number</string>
<key>value</key>
<string>inf</string>
</map>
<key>math.nan</key>
<map>
<key>tooltip</key>
<string>Value representing an error (not a number). 0/0.</string>
<key>type</key>
<string>number</string>
<key>value</key>
<string>nan</string>
</map>
<key>math.phi</key>
<map>
<key>tooltip</key>
<string>Golden ratio. (1 + math.sqrt(5))/2.</string>
<key>type</key>
<string>number</string>
<key>value</key>
<string>1.618033988749895</string>
</map>
<key>math.pi</key>
<map>
<key>tooltip</key>
<string>The number of radians in a half circle (semi-circle).</string>
<string>Ratio of a circle's circumference to its diameter. The number of radians in a half circle (semi-circle). math.tau/2.</string>
<key>type</key>
<string>number</string>
<key>value</key>
<string>3.141592653589793</string>
</map>
<key>math.sqrt2</key>
<map>
<key>tooltip</key>
<string>Square root of 2. math.sqrt(2).</string>
<key>type</key>
<string>number</string>
<key>value</key>
<string>1.4142135623730951</string>
</map>
<key>math.tau</key>
<map>
<key>tooltip</key>
<string>Ratio of a circle's circumference to its radius. The number of radians in a full circle. math.pi*2.</string>
<key>type</key>
<string>number</string>
<key>value</key>
<string>6.283185307179586</string>
</map>
<key>quaternion.identity</key>
<map>
<key>tooltip</key>
Expand Down
7 changes: 6 additions & 1 deletion generated/secondlife.d.luau
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,13 @@ declare llprim: {
---------------------------

declare math: {
pi: number,
e: number,
huge: number,
nan: number,
phi: number,
pi: number,
sqrt2: number,
tau: number,
abs: @checked (val: number) -> number,
acos: @checked (val: number) -> number,
asin: @checked (val: number) -> number,
Expand Down
28 changes: 24 additions & 4 deletions generated/secondlife.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,34 @@
"documentation": "Mathematical functions library.",
"learn_more_link": "https://luau.org/library/#math-library"
},
"@sl-slua/global/math.pi": {
"documentation": "Value: 3.141592653589793<br>The number of radians in a half circle (semi-circle).",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#pi"
"@sl-slua/global/math.e": {
"documentation": "Value: 2.718281828459045<br>Base of the natural logarithm.",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#e"
},
"@sl-slua/global/math.huge": {
"documentation": "Value: inf<br>Value larger than any other numeric value (infinity).",
"documentation": "Value: inf<br>Value larger than any other numeric value (infinity). 1/0.",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#huge"
},
"@sl-slua/global/math.nan": {
"documentation": "Value: nan<br>Value representing an error (not a number). 0/0.",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#nan"
},
"@sl-slua/global/math.phi": {
"documentation": "Value: 1.618033988749895<br>Golden ratio. (1 + math.sqrt(5))/2.",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#phi"
},
"@sl-slua/global/math.pi": {
"documentation": "Value: 3.141592653589793<br>Ratio of a circle's circumference to its diameter. The number of radians in a half circle (semi-circle). math.tau/2.",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#pi"
},
"@sl-slua/global/math.sqrt2": {
"documentation": "Value: 1.4142135623730951<br>Square root of 2. math.sqrt(2).",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#sqrt2"
},
"@sl-slua/global/math.tau": {
"documentation": "Value: 6.283185307179586<br>Ratio of a circle's circumference to its radius. The number of radians in a full circle. math.pi*2.",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#tau"
},
"@sl-slua/global/math.abs": {
"documentation": "Returns the absolute (positive) value of val.",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#abs"
Expand Down
28 changes: 25 additions & 3 deletions generated/secondlife_selene.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5540,14 +5540,36 @@ globals:
required: false
description: Configure media on a specific face. Omit link to apply to the current
prim.
math.pi:
math.e:
property: read-only
type: number
description: The number of radians in a half circle (semi-circle).
description: Base of the natural logarithm.
math.huge:
property: read-only
type: number
description: Value larger than any other numeric value (infinity).
description: Value larger than any other numeric value (infinity). 1/0.
math.nan:
property: read-only
type: number
description: Value representing an error (not a number). 0/0.
math.phi:
property: read-only
type: number
description: Golden ratio. (1 + math.sqrt(5))/2.
math.pi:
property: read-only
type: number
description: Ratio of a circle's circumference to its diameter. The number of
radians in a half circle (semi-circle). math.tau/2.
math.sqrt2:
property: read-only
type: number
description: Square root of 2. math.sqrt(2).
math.tau:
property: read-only
type: number
description: Ratio of a circle's circumference to its radius. The number of radians
in a full circle. math.pi*2.
math.abs:
args:
- type: number
Expand Down
2 changes: 1 addition & 1 deletion generated/syntax/slua.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
<key>name</key>
<string>support.constant.luau</string>
<key>match</key>
<string>(?&lt;![^.]\.|:)\bbit32|buffer|coroutine|debug|ll|llbase64|llcompat|lljson(\.array_mt|empty_array|empty_object|null|object_mt|remove)?|llprim(\.ParamsSetter)?|math(\.huge|pi)?|os|quaternion(\.identity)?|rotation(\.identity)?|string|table|utf8(\.charpattern)?|uuid|vector(\.one|zero)?\b</string>
<string>(?&lt;![^.]\.|:)\bbit32|buffer|coroutine|debug|ll|llbase64|llcompat|lljson(\.array_mt|empty_array|empty_object|null|object_mt|remove)?|llprim(\.ParamsSetter)?|math(\.e|huge|nan|phi|pi|sqrt2|tau)?|os|quaternion(\.identity)?|rotation(\.identity)?|string|table|utf8(\.charpattern)?|uuid|vector(\.one|zero)?\b</string>
</dict>
<dict>
<key>name</key>
Expand Down
2 changes: 1 addition & 1 deletion generated/syntax/slua.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@
},
{
"name": "support.constant.luau",
"match": "(?<![^.]\\.|:)\\b(bit32|buffer|coroutine|debug|ll|llbase64|llcompat|lljson(\\.array_mt|empty_array|empty_object|null|object_mt|remove)?|llprim(\\.ParamsSetter)?|math(\\.huge|pi)?|os|quaternion(\\.identity)?|rotation(\\.identity)?|string|table|utf8(\\.charpattern)?|uuid|vector(\\.one|zero)?)\\b"
"match": "(?<![^.]\\.|:)\\b(bit32|buffer|coroutine|debug|ll|llbase64|llcompat|lljson(\\.array_mt|empty_array|empty_object|null|object_mt|remove)?|llprim(\\.ParamsSetter)?|math(\\.e|huge|nan|phi|pi|sqrt2|tau)?|os|quaternion(\\.identity)?|rotation(\\.identity)?|string|table|utf8(\\.charpattern)?|uuid|vector(\\.one|zero)?)\\b"
},
{
"name": "support.constant.luau",
Expand Down
30 changes: 26 additions & 4 deletions slua_definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2069,14 +2069,36 @@ modules:
fastcall: true
typechecker: {checked: true}
constants:
- name: pi
comment: The number of radians in a half circle (semi-circle).
- name: e
comment: Base of the natural logarithm.
type: number
value: 3.141592653589793
value: 2.718281828459045
- name: huge
comment: Value larger than any other numeric value (infinity).
comment: Value larger than any other numeric value (infinity). 1/0.
type: number
value: inf
- name: nan
comment: Value representing an error (not a number). 0/0.
type: number
value: nan
- name: phi
comment: Golden ratio. (1 + math.sqrt(5))/2.
type: number
value: 1.618033988749895
- name: pi
comment: Ratio of a circle's circumference to its diameter.
The number of radians in a half circle (semi-circle). math.tau/2.
type: number
value: 3.141592653589793
- name: sqrt2
comment: Square root of 2. math.sqrt(2).
type: number
value: 1.4142135623730951
- name: tau
comment: Ratio of a circle's circumference to its radius.
The number of radians in a full circle. math.pi*2.
type: number
value: 6.283185307179586
- name: os
comment: Operating system facilities library.
functions:
Expand Down
Loading