Lightroom SDK: LrMath.log( value, base )

  • 2
  • Idea
  • Updated 5 years ago
1st choice would be upgrade to Lua 5.2 which has math.log( value, base )

If not, that function added to to sdk would be useful - thanks.

To be clear: it's the ability to specify a base which is needed (Lua 5.1 does have a math.log function, but you can't specify the base).
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 385 Reply Likes

Posted 5 years ago

  • 2
Photo of John R. Ellis

John R. Ellis, Champion

  • 3903 Posts
  • 1037 Reply Likes
Agreed it would be nice. In the meantime, you can use this:

function log (v, b) return math.log (v) / math.log (b) end
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 385 Reply Likes
Wow - I must of been asleep during the class when that was taught ;-}.

Thanks John!