Your method is correct for multiple numbers but I was thinking of a traditional two-number input. Apologies for the misunderstanding.
I don’t believe it would, especially since it’s one function. Even with the addition of all the current Luau libraries, the performance of code has not been affected negatively.
There are multiple teams of engineers within Roblox. The team that works on the studio app and the team that works on the website is not the team that works on the Luau codebase. That’s why I believe adding this function shouldn’t redirect focus of Studio and website matters.
Yeah it’s fine. I wanted to replicate the flexibility of the function. For a traditional two or three number system using “<” and “>” would be more than enough.
I meant as in for the engineers. Would slow down the progress on up-coming features by a bit.
Ohhh, that makes a lot of sense! I didn’t really knew that. Sorry for that. I guess you win on this then. I thought there was only a single engineering team, seeing how slow roblox is with most stuff.
, but I’ve written the exact same expression so many times that I’ve completely memorised it. I really dislike having to write “utility” functions that have nothing to do with the rest of my code, I agree this should be in the language.
My reason for wanting this isn’t to cut down on the utility functions I need to write but rather to abstract away any potential optimisations over the engine. I use lerping a lot in my code and, as such, need the most performant solution. Not only would moving the function over to the C-side likely result in natural optimisations but it would also allow the engine developers, who are likely more experienced in optimisation than many developers, to implement those optimisations for us.
How is this useless, I find myself writing the same function over and over again and I would like a function that eases this need and speeds my productivity. Such a bold and thoughtless claim.
i’m not so sure about this one
idk what kind of code you work on but there are definitely places where lerp gets used a lot
poor reasoning
this update should take like 1-2 minutes max
what is 1-2 minutes gonna do to the bigger updates? practically almost nothing. the “tiny bit” of delay probably won’t even amount to 0.1% of the time
as for why they’re slow with big updates, it’s partially a lack of “wanting to do it” (aka procrastinating), partially a lack of idea on what they want to do,
or maybe they’re encountering errors (those things are physically painful in c and c++, they will spam multiple verbose compile errors up your face all because you forgot a semicolon)
Yeah I figured it would be in Roblox’s GitHub repository; I was wondering how they initially found out about it. I don’t think it was formally announced in the Forum, so is it just by checking the repository frequently you and @Prototrode discover these things?
This shouldn’t be a problem; to restore the pretty slight performance edge of a normal lerp, the math.map function can check if they’re only three arguments. If so, then
return A + ((B - A) * D)
Yeah, I agree with this. It would make more sense linguistically than “map” in certain cases where it’s only functioning as a lerp. Plus it maintains consistency with other functions using the term lerp.