-
-
Notifications
You must be signed in to change notification settings - Fork 922
avm2: Implement missing Number methods #21346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avm2: Implement missing Number methods #21346
Conversation
If the code comes from someone else's PR, the author should be preserved, and you can add yourself as a co-author. |
Just FYI, I asked the author whether I can do this. But I think your proposal makes sense anyway. I'll redo the commit later today. |
b66696f
to
611b823
Compare
I agree with the author changes. |
We're talking about two different things here. The author git field tracks authorship, and authorship cannot be transferred (compared to ownership/copyright). There's no legal framework to transfer authorship and the point of authorship is to not be transferrable. You could create this PR without asking jarca0123 for consent, because they've already given consent by distributing their works under an MIT + Apache license, which explicitly allows doing such things (under some circumstances). |
What I was trying to convey was that I wasn't maliciously trying to appropriate anyone's contribution. Nothing about legality or anything like that. |
I wasn't implying that you were doing this maliciously, I'm pretty sure you weren't; I assumed it was a simple mistake :) |
Add static methods to Number class that mirror Math methods: - Trigonometric: sin, cos, tan, asin, acos, atan, atan2 - Arithmetic: abs, ceil, floor, round, sqrt, exp, log, pow - Comparison: max, min - Utility: random These methods delegate to their Math counterparts and enable previously failing avmplus tests. Co-authored-by: Tomáš Procházka <[email protected]>
611b823
to
4c486c4
Compare
------------------------------------------------------------------------------------------ duckstation.mk bcb6f98cbd6fe2bbf079be874165dbe748a82d62 # Version: Commits on Aug 17, 2025 ------------------------------------------------------------------------------------------ Common: Eliminate more static functions in headers, -------------------------------------------------------------------------------------- openmsx.mk f112285713ae8973c5bf16468af8dfdb0d59bdaf # Version: Commits on Aug 16, 2025 -------------------------------------------------------------------------------------- Workaround gcc-12 bug in std::string::resize_and_overwrite() 'david_' reported a bug introduced in commit 4d667f5151890d9d8, after some investigation it turned out to be a bug in gcc-12 (pre gcc-12.4). https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104222 Luckily there's a relatively easy workaround., ------------------------------------------------------------------------------------- ppsspp.mk 794efe368196a996f90b71f43ff3b23971e992c8 # Version: Commits on Aug 16, 2025 ------------------------------------------------------------------------------------- Merge pull request #20702 from bslenul/lr-assets-msg [Libretro] Display a warning message if assets are missing, --------------------------------------------------------------- ruffle.mk nightly-2025-08-17 # Version: Commits on Aug 17, 2025 --------------------------------------------------------------- ## What's Changed * render: Always copy directly to wgpu buffer in `CopyBitmapToTexture`. by @moulins in ruffle-rs/ruffle#21317 * core: Reduce `TDisplayObject` boilerplate by @moulins in ruffle-rs/ruffle#21302 * avm2: Implement missing Number methods by @SuchAFuriousDeath in ruffle-rs/ruffle#21346 * core: Completely remove `GcCell` by @moulins in ruffle-rs/ruffle#21322 **Full Changelog**: ruffle-rs/ruffle@nightly-2025-08-16...nightly-2025-08-17, --------------------------------------------------------------------------------------- thextech.mk d09d7ca518d51a1b10ffbd18aa48c5f2aec283b3 # Version: Commits on Aug 17, 2025 --------------------------------------------------------------------------------------- render_base.cpp: ouch, don't flip PNG depth test, ----------------------------------------------------------------------------------- ymir.mk a9c66112e1b50c4eb86e08118747fc57bef7cff4 # Version: Commits on Aug 16, 2025 ----------------------------------------------------------------------------------- chore(VDP): Hide memory/register accessors again and expose them through the probe This fixes sandbox compilation errors in Release builds, ------------------------------------------------------------------------------------------ devilutionx.mk 1ca8fcf460c6f2faada07bf084c4db13bad34fbc # Version: Commits on Aug 16, 2025 ------------------------------------------------------------------------------------------ Removed the unused ParseMonsterIdIfNotEmpty() function, ------------------------------------------------------------------------------------------- jazz2-native.mk 3a573389d916c10b14637054277355f4e5465bb5 # Version: Commits on Aug 16, 2025 ------------------------------------------------------------------------------------------- Fixed crash on level change if more than 4 players, fixed dizziness after death, ignore hooks when frozen, added `/set kills`, `/set laps` and `/set treasure commands`, ---------------------------------------------------------------------------------------- openjkdf2.mk c65ab09e2a5bca6338830c22c8b6f4b15a1f6db7 # Version: Commits on Aug 17, 2025 ---------------------------------------------------------------------------------------- Add STDBITMAP_PARTIAL_LOAD to save memory on DSi, ---------------------------------------------------------------------------------------- openmohaa.mk a824d9e9126934b5e57990ef7ef5ca14d8bfee21 # Version: Commits on Aug 16, 2025 ---------------------------------------------------------------------------------------- Fix access violation in angles_pointat with entity and target, ---------------------------------------------------------------------------------------- supertux2.mk 7e6cf8d2bfd9fb62d7032e40059b3204a2165053 # Version: Commits on Aug 17, 2025 ---------------------------------------------------------------------------------------- Update translations, ---------------------------------------------------------------------------------------- retroarch.mk 1cf24c5afeb5ac3b09c63752ad4ab47693b3608a # Version: Commits on Aug 17, 2025 ---------------------------------------------------------------------------------------- update emscripten get_proc_address (#18180), ----------------------------------------------------------------------------------- tr1x.mk 4b9bf3aa0735f6fd59834f4a40390ebbfcb04bd3 # Version: Commits on Aug 16, 2025 ----------------------------------------------------------------------------------- lara/state/land: add slide-to-sprint support This augments the slide-to-run animation to support a quicker transition into sprinting if that input is detected., ----------------------------------------------------------------------------------- tr2x.mk 4b9bf3aa0735f6fd59834f4a40390ebbfcb04bd3 # Version: Commits on Aug 16, 2025 ----------------------------------------------------------------------------------- lara/state/land: add slide-to-sprint support This augments the slide-to-run animation to support a quicker transition into sprinting if that input is detected., ---------------------------------------------------------------------------------------------- libretro-ppsspp.mk 794efe368196a996f90b71f43ff3b23971e992c8 # Version: Commits on Aug 16, 2025 ---------------------------------------------------------------------------------------------- Merge pull request #20702 from bslenul/lr-assets-msg [Libretro] Display a warning message if assets are missing,
The uncontroversial changes split off from #21018