Notifications
Clear all

what happened to deg2rad?


Potsmoke66
(@potsmoke66)
Captain Registered
Joined: 7 years ago
Posts: 1815
Topic starter  

i didn't like to pester you again on the issue tracker but i need a explanation,

until 22 we had a function "math.deg2rad()"

it has changed in alpha22 nightly builds to "deg2rad()"

now its "?" (gone? since that stuff is moved to the source, i can't see and i don't, really don't have the patience to hunt after such imo useless changes)

are such changes needed?

does make a changing of a name of a function any difference except to spoil? (with the exception if it would makes it better to understand)

fortunately i never used it, except for the "caiman" and used mostly a own expression (it's easy) "3.142/180*degrees" or i calculated it and entered the result.

imagine i would have used it from the beginning... 👿

my intention to use it for the "caiman" was to show a interested modeler (which we havn't a lot of) how you can make it a little easier by using a existing function.

but really is such needed, or is it only because you can do it and we have to swallow it?

well i already expect a renaming or removing of i.e. "cuboid()" and marcel can "trash" his stations.

but it might be there is a comprehensible explanation to it, then please explain that to me.


[/hr]

or is this the beginning of the end?

i mean the beginning of removing the LMR?

didn't we long time contributors lik marcel and little me have a right to vote?

or is your socalled "meritocracy" only valid for a elite (all animals are the same...) like i feel it's all around the world.

isn't it enough that this rules the world outside? do we need this behave in pioneer?

never mess with the horse and the donkey!

a reminder 😉

http://tom.noflag.org.uk/index.html

i know you know it, but just look at the pic in the right upper corner, that's pioneer!

and

"BE AWARE!"

only one who can see the evil in himself is able to fight it

greetings,

Gregor & George 😀

in diesem sinne,

"never went to college, never went to school, but when it comes to lovin' i'm a educated fool"


Quote
s2odan
(@s2odan)
Captain Registered
Joined: 15 years ago
Posts: 1212
 

Hmm I remember the function your talking about, I've used it myself when placing bases on a planet. As far as I can tell it should be math.deg2rad(xx)

From https://github.com/pioneerspacesim/pion ... 00_sol.lua


ReplyQuote
Potsmoke66
(@potsmoke66)
Captain Registered
Joined: 7 years ago
Posts: 1815
Topic starter  

yep, but didn't works anymore, at least i tried both,

means like i said above, changed in alpha22 nightly from math.deg2rad() to deg2rad() but now both fails.

but i don't mind to much i can replace it easely and never used it except for one model, usually i precalculate that.

of what i think if it's not dynamic used, is more reasonable then a function call.

actually i put a own one in front of the caiman's script, i also can make a helper function from it, but we had that already.

you know i have beyond all my kindness a very suspicious mind...

i was just wondering what has happened to it and why, such things really make no sense to me and in my upraging kind of way i am,

i will make again some foes, with my "whinings"


ReplyQuote
robn
 robn
(@robn)
Captain Registered
Joined: 13 years ago
Posts: 1035
 

math.deg2rad is available to the custom system environment. It was removed from the LMR environment during some recent cleanup work. It was not removed out of any malicious intent. It just wasn't being used by anything in the standard distribution. An oversight if anything.

It is easily replacable:

Code:
function math.deg2rad (n) return n * math.pi / 180 end

Update: I've just been informed that its even more easily replaceable, as it comes with the Lua standard math library. So an alias is all that's necessary:

Code:
math.deg2rad = math.rad

ReplyQuote