Time |
Nick |
Message |
02:16 |
|
YuGiOhJCJ joined #minetest-dev |
04:00 |
|
MTDiscord joined #minetest-dev |
05:17 |
|
calcul0n joined #minetest-dev |
06:08 |
|
MTDiscord joined #minetest-dev |
06:40 |
MTDiscord |
<luatic> kilbith: Disagreed |
06:40 |
MTDiscord |
<luatic> while I like degrees, there are good reasons for radians |
06:41 |
MTDiscord |
<luatic> such as the Lua builtin math funcs all expecting radians |
06:42 |
MTDiscord |
<ROllerozxa> radians my precious |
06:48 |
|
MTDiscord joined #minetest-dev |
08:23 |
|
MTDiscord joined #minetest-dev |
08:47 |
kilbith |
that's not enough to offset the intuitiveness of degrees |
08:48 |
kilbith |
radians are to foot what degrees are to meter |
08:49 |
MTDiscord |
<luatic> No. |
08:50 |
MTDiscord |
<luatic> the only point degrees have going for them is that they can represent common angles using integers rather than multiples of pi |
08:51 |
MTDiscord |
<luatic> you can also straight up multiply radians with the radius to get the circumference :) |
08:51 |
kilbith |
what happens in the real world is that a modder will instinctively feed a degree when they face a rotation function, 99% of the time |
08:52 |
MTDiscord |
<luatic> I'm all for consistency, but I would prefer going with radians |
08:52 |
MTDiscord |
<luatic> also kilbith: how would you back that claim up? |
08:53 |
kilbith |
aside intuitiveness, degrees are also more consistent (irrlicht uses them) |
08:53 |
MTDiscord |
<luatic> granted, radians are introduced after degrees at school (primarily because pi is introduced late due to being irrational) |
08:53 |
kilbith |
degrees are introduced earlier in school yes |
08:53 |
MTDiscord |
<luatic> irrlicht also uses both degrees & radians |
08:53 |
MTDiscord |
<luatic> it suffers from the same mess as Minetest |
08:53 |
kilbith |
but to the general public, degrees are much more common also |
08:53 |
MTDiscord |
<luatic> some functions only take degrees, some only radians |
08:54 |
MTDiscord |
<luatic> but we're not targeting the general public, we're targeting the Minetest-modding public |
08:54 |
kilbith |
Irrlicht's set_rotation functions take degrees |
08:54 |
kilbith |
Minetest-modding public -> which is the general public |
08:54 |
kilbith |
most of them are not mathematicians |
08:54 |
MTDiscord |
<ROllerozxa> irrlicht uses degrees? let's change that in irrlichtmt then |
08:55 |
MTDiscord |
<luatic> I support that |
08:55 |
MTDiscord |
<luatic> get rid of degrees |
08:55 |
kilbith |
you see that's your problem, you can't make a software intuitive enough |
08:55 |
MTDiscord |
<ROllerozxa> degrees should only be for player-accessible settings like FOV |
08:56 |
MTDiscord |
<luatic> kilbith: as to your meter-foot analogy, I just found an interesting quote: "The number 360 can be broken in to many factors, 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 45, 60, 90, 120, 180, 360. This makes it easy to divide a circle into equal parts. (This is similar to the reason why we divide a foot into 12 inches.)" |
08:56 |
rubenwardy |
The API should have used degrees, and there should be methods like `set_rotation_rad` for radians. This would have resulted in the most consistency |
08:56 |
nrz |
as no one is happy with radians or degrees, i propose to use watch clock hours instead, at least we won't use math conventions ? |
08:57 |
kilbith |
what rubenwardy says |
08:57 |
nrz |
set_rotation('2h') |
08:57 |
MTDiscord |
<luatic> I propose we solve this the Java way |
08:57 |
MTDiscord |
<luatic> Our rotation functions should only accept objects of an Angle class |
08:57 |
nrz |
generally in API radians have specific undernstandable radian calls an degrees are by default |
08:57 |
rubenwardy |
but whatever. I was outvoted in 2017, and now the damage is done. Increasing inconsistency, the Minetest way |
08:57 |
MTDiscord |
<luatic> Radians and Degrees are subclasses of Angle |
08:58 |
MTDiscord |
<luatic> rubenwardy: I like the suffix solution. I think it should go both ways. func should keep using rads/degs for backwards compat. func_deg takes degs. func_rad takes rads. |
08:58 |
MTDiscord |
<luatic> that way there will be no surprises |
08:59 |
kilbith |
no there would be only func() for degrees, radians takes an additional substring |
08:59 |
kilbith |
-s |
08:59 |
MTDiscord |
<luatic> No. |
09:00 |
kilbith |
man you're so stubborn |
09:00 |
MTDiscord |
<luatic> so are you |
09:00 |
rubenwardy |
also, whilst radians may be better than degrees when calculating - they're both much worse than using transformation matrices. There's the gimble lock problem |
09:00 |
MTDiscord |
<luatic> gimbal* |
09:00 |
MTDiscord |
<luatic> we need quaternions, not transformation matrices |
09:01 |
rubenwardy |
https://docs.godotengine.org/en/stable/tutorials/3d/using_transforms.html |
09:01 |
MTDiscord |
<luatic> we have scale, translation & rotation; switch rotation to quaternions and we'll be fine |
09:01 |
rubenwardy |
transforms are a bit easier to deal with than quaternions, and also deal with position and scale |
09:02 |
rubenwardy |
well maybe not, they're both equal levels of dark magic |
09:05 |
rubenwardy |
although, you still invoke radians vs degrees in util functions object.transform.basis = object.transform.basis.rotated(axis, rotation_amount) |
09:46 |
|
olliy joined #minetest-dev |
10:32 |
MTDiscord |
<Crystalwarrior> Could have rad2deg and deg2rad |
10:32 |
MTDiscord |
<Crystalwarrior> As helper funcs |
10:33 |
MTDiscord |
<Crystalwarrior> I agree degrees are easier to get so I understand why they were chosen for intuitiveness |
10:33 |
MTDiscord |
<Crystalwarrior> But I also like having options |
10:33 |
|
proller joined #minetest-dev |
10:33 |
MTDiscord |
<Crystalwarrior> I also suck at math very bad and had to learn how radians work the hard way LOL |
10:59 |
MTDiscord |
<luatic> Lua has these already |
10:59 |
MTDiscord |
<luatic> math.rad and math.deg |
11:00 |
MTDiscord |
<luatic> lua > math.rad(180) 3.1415926535898 > math.deg(math.pi) 180.0 |
11:00 |
MTDiscord |
<luatic> they were not chosen in the first place |
11:01 |
MTDiscord |
<luatic> they were chose in some places; degrees were chosen in other places |
11:02 |
MTDiscord |
<luatic> there's not much math involved here: just remember that 180° = pi in radians, or 360° = 2pi, or even that circumference = full circle in radians * radius = 2pi * radius |
11:02 |
rubenwardy |
oh, handle |
11:02 |
rubenwardy |
*handy |
11:03 |
rubenwardy |
Lua doesn't have round but does have simple coverter |
11:03 |
MTDiscord |
<Crystalwarrior> Ye |
11:04 |
|
Fixer joined #minetest-dev |
11:04 |
MTDiscord |
<luatic> I suppose the good reason against round is that it is mostly redundant with math.floor(x + 0.5) or math.ceil(x + 0.5), but you have to spell out whether you want 0.5 to be rounded down or up (the entire rounding mode ties to something thing is a mess). |
11:05 |
MTDiscord |
<luatic> can't be doing it wrong if you're not doing it at all, that's the Lua philosophy |
11:52 |
|
proller joined #minetest-dev |
12:23 |
rubenwardy |
rad/deg is mostly redundant with * and / |
12:24 |
|
proller joined #minetest-dev |
12:28 |
MTDiscord |
<luatic> hehe true |
12:29 |
MTDiscord |
<luatic> constants might indeed have been cleaner than func calls |
14:20 |
|
proller joined #minetest-dev |
15:21 |
|
appguru joined #minetest-dev |
16:16 |
|
calcul0n joined #minetest-dev |
16:47 |
|
olliy joined #minetest-dev |
16:51 |
|
natewrench joined #minetest-dev |
20:13 |
|
Sokomine joined #minetest-dev |
21:53 |
|
Fixer_ joined #minetest-dev |
21:55 |
|
Thomas-S_ joined #minetest-dev |
21:56 |
|
book`_ joined #minetest-dev |
21:57 |
|
[0] joined #minetest-dev |
21:58 |
|
paradust_ joined #minetest-dev |
22:31 |
|
cheapie left #minetest-dev |
22:32 |
|
panwolfram joined #minetest-dev |
22:36 |
|
proller joined #minetest-dev |
22:38 |
rubenwardy |
merging #12732 in 10 |
22:38 |
ShadowBot |
https://github.com/minetest/minetest/issues/12732 -- fix not perfectly placed label in tab_online by Niklp09 |
22:40 |
|
cheapie joined #minetest-dev |
23:08 |
|
Desour joined #minetest-dev |
23:17 |
Desour |
just to be part of today's bikesheddery: we could also use multiples of full circles, i.e. 2pi -> 1.0, 90° -> 0.25 => right angles (which is what we use most often in minetest) are still exact (though not integral) + there's no magic constant + you can get the same angle by taking the fractional part only + (most importantly) nobody uses it, so you are all equally unsatisfied |
23:20 |
Desour |
(btw. ruben's suggestion of using transformation matrices works well with 90° rotations: <https://github.com/Desour/dslib/blob/master/src/rotnum.lua>) |
23:26 |
|
proller joined #minetest-dev |