MathLib/TextLib Requests

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

MathLib/TextLib Requests

Post by steeffeen »

yey just another requests/suggestions thread :D

MathLib

the MathLib offers some really useful functions but there's one i'm definitely missing:

Code: Select all

Real	Round(Real _Value, Integer _DecimalPlaces);
because currently i always have to use my workaround.. example for 2 decimal places:

Code: Select all

declare RoundedReal = MathLib::NearestInteger(Real * 100.) / 100.;
and i have a question about Integer to Real conversion, aren't these two methods equivalent? what's the difference?

Code: Select all

Real	ToReal (Integer _Argument1);
Real	NearestReal (Integer _Argument1);
i think it would be helpful if the parameter names of the Pow() method wouldn't be called _ArgumentX

Code: Select all

Real 	Pow (Real _Argument1, Real _Argument2);
[would be better like this]
Real 	Pow (Real _Base, Real _Exponent);
of course it's just about the documentation :)


TextLib

what's the point of the following method?

Code: Select all

Text	FormatInteger (Integer _Argument1, Integer _Argument2);
i think it would be great to have a method to know how big a string displayed on a label really will be, of course that's somehow impossible regarding stuff like style and textsize but at least knowing how much $color/style coding is included would be helpful
it's quite difficult and i can't really think of a good solution actually :( something like:

Code: Select all

Integer	Width(Text _Argument);
or methods like in manialib to strip styles would be great

Code: Select all

Text	StripLinks (Text _Argument);
Text	StripColors (Text _Argument);
Text	StripStyles (Text _Argument);
regards,
steff
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    faserg1
    Posts: 446
    Joined: 06 Jul 2011, 19:54
    Location: Russia
    Contact:

    Re: MathLib/TextLib Requests

    Post by faserg1 »

    steeffeen wrote:i think it would be great to have a method to know how big a string displayed on a label really will be, of course that's somehow impossible regarding stuff like style and textsize but at least knowing how much $color/style coding is included would be helpful
    it's quite difficult and i can't really think of a good solution actually something like:
    CODE: SELECT ALL
    Integer   Width(Text _Argument);
    ?

    Integer Length (Text _Argument1) * [Coeff]
    If so, I writing my own lib, I will make this thing for you.
    Есть вопросы? Только скайп - faserg1.
    Image
    Жизнь - это динамика ритма. Life is dynamic of rhythm.
    Post Reply

    Return to “ManiaScript”

    Who is online

    Users browsing this forum: No registered users and 2 guests