tovector and toquaternion should accept tables as input
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Look for the tovector and toquaternion functions in the codebase, likely in files related to vector and quaternion types. Understand how they currently parse arguments. Add support for table input by checking the argument type and extracting numeric values either by index or named keys (x, y, z, s). Test with Lua scripts to ensure the new behavior matches the examples.
Written by the indexing model from the issue text.
Description
It would be nice if vectors and quaternions could be initialized from a table, like so:
tovector({1, 2, 3}) --> <1, 2, 3>
tovector({x=1, y=2, z=3}) --> <1, 2, 3>
toquaternion({1, 2, 3, 4}) --> <1, 2, 3, 4>
toquaternion({x=1, y=2, z=3, s=4}) --> <1, 2, 3, 4>
I don't have a really compelling use case, but I still think it would be nice
- Dominant language
- C++
- Stars
- 17
- Forks
- 10
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from secondlife/slua
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
secondlife/slua#95 ·
-
documentation team:server
secondlife/slua#91 · 1 assignee ·
-
secondlife/slua#62 · 6 comments · 1 assignee ·
-
enhancement
secondlife/slua#25 · 1 assignee ·
-
enhancement
secondlife/slua#24 · 2 comments · 1 assignee ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main Openai_reviewed
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ydb-platform/ydb#53974 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google/libultrahdr#485 ·