Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Derivatives

Status
Not open for further replies.
Does anyone know how to calculate the derivative of a mathematical expression, or function optimization with Lagrange multipliers, in Ruby?? This is for a advanced shop/crafting script I'm working on, and I'm going to use an general equilibirum economic model to handle the item prices.
 
Wow, I commend you for trying something complicated. I'm no scripter, but I'm not sure how to do this with the derivative formula...because I only know how to do it on paper to get it to work. If you put it into the computer, you'll be dividing by 0...

But I'm assuming you'll only be working with a decimal, right? So maybe that can help you out somehow...And maybe Ruby has some sort of "derivative" method you can use. Idk...
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top