(28/48/50) Lambert W Function
|
03-23-2023, 07:30 PM
(This post was last modified: 03-23-2023 07:42 PM by Albert Chan.)
Post: #11
|
|||
|
|||
RE: (28/48/50) Lambert W Function
(03-23-2023 05:53 PM)John Keith Wrote: There is one line in your program that concerns me: You are right. Guard should be if (h == 0) ... but that would never happen. Guard is not needed. I'll remove it. Quote:x = sqrt(2*h/r) * (x and -1 or 1) Last term is Lua idiom for ternary operators It says that pick -1 if x evaluated true (neither nil nor false), 1 otherwise. Signs are the result of solving W guess quadratic equation, 2 roots for W 2 branches |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)