Skip to content

Add new functions bit32.s32 and bit32.smul#69

Merged
HaroldCindy merged 4 commits intosecondlife:mainfrom
tapple:bit32.s32
Mar 12, 2026
Merged

Add new functions bit32.s32 and bit32.smul#69
HaroldCindy merged 4 commits intosecondlife:mainfrom
tapple:bit32.s32

Conversation

@tapple
Copy link
Copy Markdown
Contributor

@tapple tapple commented Mar 9, 2026

No description provided.

Copy link
Copy Markdown
Collaborator

@HaroldCindy HaroldCindy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Just a couple nits.

},
"@sl-slua/global/bit32.s32": {
"documentation": "Mod this number from float64 range to signed int32 range and truncate to integer. Makes integer arithmetic compatable with LSL.",
"learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#s32"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't a docs link as of yet ;)

Might need a generator update for things that don't actually have upstream docs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd have to mark them. and it's only temporary that there aren't docs, so I'd rather not worry about it. I'd be doing work that needs reverting

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, we can come up with a better notation when there's somewhere else to point people.

must-use: true
- name: smul
comment: Multiplies two signed 32-bit integers. Returns the result as a signed 32-bit integer, wrapping as necessary.
Avoids precision loss ascociated with float64 multiplication. Compatable with LSL integer multiplication.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Compatable/Compatible/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

returnType: number
must-use: true
- name: s32
comment: Mod this number from float64 range to signed int32 range and truncate to integer.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Mod" is ambiguous in this context

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Mod/Wrap/

@HaroldCindy
Copy link
Copy Markdown
Collaborator

Looks like the files just need regenerating

@tapple
Copy link
Copy Markdown
Contributor Author

tapple commented Mar 12, 2026

Looks like the files just need regenerating

done

@HaroldCindy HaroldCindy merged commit abd0a20 into secondlife:main Mar 12, 2026
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants