Luanti logo

IRC log for #luanti-dev, 2026-11-14

| Channels | #luanti-dev index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
01:48 ndorik-zenith joined #luanti-dev
02:22 ndorik-zenith joined #luanti-dev
03:07 mrcheese joined #luanti-dev
03:14 ndorik-zenith joined #luanti-dev
03:18 ndorik-zenith_ joined #luanti-dev
04:58 [MatrxMT] joined #luanti-dev
05:00 MTDiscord joined #luanti-dev
05:31 buddyholly joined #luanti-dev
05:48 ndorik-zenith joined #luanti-dev
09:47 ndorik-zenith joined #luanti-dev
10:18 ndorik-zenith joined #luanti-dev
10:41 ndorik-zenith joined #luanti-dev
10:44 ndorik-zenith_ joined #luanti-dev
12:42 ndorik-zenith joined #luanti-dev
13:08 Krock sfan5: by the way - is #17526 now implemented roughly how you'd like? In that case I'd go ahead with the review.
13:08 ShadowBot https://github.com/luanti-org/luanti/issues/17526 -- Implement core.register_on_interact by andriyndev
13:15 ndorik-zenith_ joined #luanti-dev
13:26 sfan5 please ping me in the issue so I don't forget
14:17 dzho joined #luanti-dev
14:17 dzho joined #luanti-dev
14:47 ndorik-zenith joined #luanti-dev
14:58 ndorik-zenith joined #luanti-dev
15:31 buddyholly joined #luanti-dev
15:54 pgimeno @luatic re #16870: I'm confused by this: "  `Rotation.compose()` is an alias for `Rotation.identity()`,\n  `Rotation:compose()` copies the rotation."
15:54 ShadowBot https://github.com/luanti-org/luanti/issues/16870 -- Add matrix & rotation Lua APIs (2nd try) by appgurueu
15:55 pgimeno Does that mean that I can do second:identity(first) ?
15:57 pgimeno Also, I miss at least two functions: invert a rotation (conjugation in quaternion terms, inverse matrix in matrix terms), and obtaining the rotation between two rotations (which would probably count as a constructor)
15:59 pgimeno and yet another one, shortest rotation between two vectors
16:03 MTDiscord <luatic> pgimeno: Rotation.compose(...) is variadic. Rotation.compose() thus is an alias for Rotation.identity(). Rotation.compose(r), or equivalently r:compose(), copies r.
16:03 MTDiscord <luatic> only for 2 or more arguments actual composition happens.
16:04 MTDiscord <luatic> I included inverting for both rotations and matrices, let me make sure I didn't accidentally lose the docs in rebasing or such.
16:05 pgimeno not sure if I'm understanding it properly, but then I wouldn't say it's an alias, just that it's equivalent
16:05 MTDiscord <luatic> fair enough, let me reword that
16:06 pgimeno to me, an alias is literally the same function with a different name
16:07 MTDiscord <luatic> anyways, i think you must've missed the docs for rot:invert() and mat:invert(), they're there (as expected)
16:08 pgimeno yes, rot:invert() is there, sorry, but there's no division of rotations, is there? you'd have to compose with the inverse rotation
16:08 MTDiscord <luatic> yes
16:09 MTDiscord <luatic> that is also preferable: with division it is somewhat unclear what the expected composition is. a/b could be understood to be b^(-1) a or a b^(-1).
16:10 MTDiscord <luatic> (maybe with a slight bias towards the latter due to order of operands)
16:10 MTDiscord <luatic> (in any case i've also avoided arithmetic overloads for rotations here because i find methods clearer)
16:11 MTDiscord <luatic> shortest rotation between two vectors is what maps_to should be, though maybe i didn't make the "shortest" part explicit in the docs
16:12 MTDiscord <luatic> yep i didn't document which way around maps_to goes
16:12 MTDiscord <luatic> the "uniquely defined" is also slightly bogus :p
16:15 ndorik-zenith joined #luanti-dev
16:15 MTDiscord <luatic> if i just mention that it's the shorter of the two possible rotations in the plane it's fine though
16:16 MTDiscord <luatic> thanks for the feedback!
16:26 pgimeno np, thanks for your work!
16:28 pgimeno apparently I wasn't looking at the right diff, only at the diff for the first commit, sorry
16:29 MTDiscord <luatic> no problem
16:29 MTDiscord <luatic> the commit history got messy, it'll be squashed away when it gets merged
16:29 pgimeno this isn't right: * Let `v1`, `v2` be nonzero direction vectors.\n    It holds that `Rotation.axis_angle(v1:cross(v2), v1:angle(v2)):apply(v1)` is (approximately) `v2`.
16:30 pgimeno it will be approximately norm(v2)*length(v1), that is, a vector in the direction of v2 and the length of v1
16:31 pgimeno you can say "Let `v1`, `v2` be normalized vectors."
16:39 pgimeno by "norm(v2)" I meant "normalize(v2)", not "the norm of v2"
16:41 MTDiscord <luatic> i'll just say "Let v1, v2 be vectors of length 1"
16:41 pgimeno that'll do
16:41 pgimeno but you use "normalized" in other places so that's OK too
16:42 pgimeno you can also say "vectors of the same length", no need for them to be normalized
16:44 MTDiscord <luatic> or just: "Let v1, v2 be nonzero vectors. Then it holds that Rotation.axis_angle(v1:cross(v2), v1:angle(v2)):apply(v1):normalize() is (approximately) v2:normalize()."
16:44 pgimeno as you prefer, there are many options ^.^
16:48 MTDiscord <luatic> https://github.com/luanti-org/luanti/pull/16870/commits/8c3233695556b3ffc38eb3cf539bbd48211e20f8 that should do
16:56 pgimeno looks good
17:04 eragon joined #luanti-dev
18:09 Panquesito7 joined #luanti-dev
20:56 sfan5 https://github.com/luanti-org/luanti/blob/a10dc8dbff3b0af8295ae55df44f65b1d9ee92c7/src/client/game.cpp#L2907-L2915 why is this a thing
21:47 erbium joined #luanti-dev
21:56 turtleman joined #luanti-dev
22:41 erbium_ joined #luanti-dev
23:33 erbium joined #luanti-dev
23:33 panwolfram joined #luanti-dev

| Channels | #luanti-dev index | Today | | Google Search | Plaintext