Jump to content

lsl new functions


SatguruS1488312156
 Share

You are about to reply to a thread that has been inactive for 4530 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I see that they mark the new functions as "NEW".

I wonder how long do they leave those as marked new.

It would be helpful if, like other scripting or non -scripting languages, lsl had release or  version numbers. This way one could check the release notes to find information about any new functions, features etc.

Another thing which would help too would be if the description of each function in the wiki showed the date on which that function was introduced.

 

Link to comment
Share on other sites

Generally speaking, the documentation about LSL is not produced by LL.  The wiki is maintained by scripters like you and me.  Beyond very basic descriptions of syntax, LSL is offered essentially as a black box.  Users figure out how its functions behave and share what they learn about its quirks.

Link to comment
Share on other sites

I believe currently we've been leaving the "new" tag on any function that wasn't originally included as of ~MONO rollout.

the function list is however.... touchy.

you'll notice the pretty list on top, and the standard category list below.... the category list is a bit flaky and doesn't like synching up (occasionally misplacing items in the wrong sort bin), the pretty list however has to be done manually, and is on a separate template. we've bee getting a bit more Linden participation recently, where they'll outline the basics of a new function and mark it "pre-release" and then whowever happens to notice it being released will remove the pre-release flag and add it to the pretty list.

Link to comment
Share on other sites

While we're vaguely on the subject..... I went looking for the function wiki page for llSetVelocity the other day and had a heck of a time finding it.  It is at http://wiki.secondlife.com/wiki/LlSetVelocity, but the function is not included in the master list at http://wiki.secondlife.com/wiki/Category:LSL_Functions .  I have never figured out how to mess with that template, so I don't know how to add it.  Do you, Void?

Link to comment
Share on other sites

it's actually the "LSL ALL Functions/Name" template you want, the format is just a plain list so you can just copy paste a line and edit the targets (just make sure you get the alphabetical order right)

ETA:
I went ahead and added that one... there's probably more that need to be added.

Link to comment
Share on other sites

  • 2 weeks later...

Thank you, Digit.  I somehow missed  seeing a couple of those as they were introduced.  Time to start playing and see what they can do.

BTW, llGetMassMKS doesn't show up yet for me.  I wonder about that one, though.  It's never been clear to me what unit LSL uses for mass, but I have assumed that it was kilos. No?  If not, and they had to introduce a whole new function just to apply a constant factor, what unit were they using before?

Link to comment
Share on other sites

That makes sense.  It sort of begs another question, though....  I can't think of a reason you might need to know the mass of an object unless it were physical, and you can't (or shouldn't) make a physical object large enough to hit the new upper limit for prims ..... so again, why bother with llGetMassMKS ?

Link to comment
Share on other sites

(64 *100)^3 = 262,144,000,000.0

so that's the old function... a 64m cube, breaks the maxInt cap

new function, 262,144,000.0 doesn't break the cap for 10 of those.

not that the cap REALLY matters since it'll be in a float, but it mans more likelyhood of easy translation.

although tbh, I don't see much use in llGetMass* anyways

Link to comment
Share on other sites

llGetMass and llGetMassMKS return a 32 bit float not a 32 bit integer . 

You can  have some floats superior to 2^32.

 

I ve done a quick test with a cube 64 * 64 *64 with the max density ( max density is actually at 22587.000 kg / m3 .

llGetMass  returns 59210464.000000 and  llGetMassMKS 5921046528.000000

 

I ve done a second test with a cube 64 * 64 *64 with a density not mutiple of kg/m3 .

For instance , for density = 1.235 , the theoric value is 323747,84

llGetMass  returns 3237.478271 and  llGetMassMKS   323747.843750

 

Well , the both are wrong ...

 

Now , do a shear of 0.5 on X  ;

if you remember your geometry courses, the number of m3 doesn t change : llGetMass  returns 3 3237.480225   and  llGetMassMKS   323748.031250

It s bugged ..

 

Link to comment
Share on other sites

I'm using that supposition that in many cases the float will be converted to integer... but that only gets to happen if the float range doesn't exceed the integer range.

as for your results... precision for floats of 32bits is only 24bits, or just over seven significant digits of absolute accuracy. one of the other may be using 64bits behind the scenes to better approximate the float giving slightly different results past the 7th digit (or they may be using different rounding models), so not so much bug, as inconsistency.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4530 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...