C_Corpze
(Corpze_TheDeadestOne)
#41
I actually support feature requests like these.
Implementing common math functions into the engine itself is way more efficient than writing it in Luau since in-engine code is much more performant.
Luau is a interpreted language that runs on a virtual machine most of the time.
And Native Luau doesn’t work it’s magic on everything all the time.
While we’re at it, having a function for reflecting/flipping Vectors and CFrames on a given axis would also be very nice to have.
3 Likes
Wara112
(TheDevGuy)
#42
2 Likes
ramdoys
(Ram)
#43
It is merged! It probably will come in the next week’s Studio release.
1 Like
It will be added to library soon because of release notes 656.
6 Likes
IIRebelll
(Rebel)
#45
When it could be as simple as math.lerp(a, b, t), there’s no need to call it useless when it could be even simpler.
efsane14010
(LegendaryDev)
#46
I may be wrong but isnt there a lerp function ?
It was just added in the most recent release notes.
3 Likes
awry_y
(kitty_kat)
#48
Yea yea. No need to continue the argument further because yall already got it.
math.lerp
isn’t useless because it can be written in one line! Loads of other math
functions can be written on one line too.
function sin(x)
return x - 0.16605*x^3 + 0.00761*x^5
end
print(math.sin(math.rad(10))) -- 0.173...
print(sin(math.rad(10))) -- 0.173...
print(math.sin(math.rad(50))) -- 0.766...
print(sin(math.rad(50))) -- 0.766...
1 Like
Caesures
(Caesures)
#50
Can be fastcalled if it’s a triple arg function since version 6, and it is.
2 Likes
maxim01689
(maxim01689)
#51
It exists in type checking from now (not implemented yet)