1 Reply Latest reply on Mar 9, 2018 11:35 AM by Sanford Whiteman

    FlowBoost Logarithm Operation

    Raphael Varieras

      For FlowBoost users out there, can you tell me how you've implemented the logarithm operation? Is there such a thing as a FBMath.log function? Or better yet, is there a reference of available function somewhere?

        • Re: FlowBoost Logarithm Operation
          Sanford Whiteman

          Hi Raphael,


          Use the built-in JavaScript Math.log10:


          var totalScore = FBMath.sum(
            ( {{Company.ENR_Top_100_Design_Build_Firms__c}} ? 5 : 0 ),
            ( {{Company.ENR_Top_150_Global_Design_Firms__c}} ? 5 : 0 ),
            ( {{Company.ENR_Top_200_Environmental_Firms__c}} ? 5 : 0 ),
            Math.log10(1+{{Company.NumberOfEmployees}}) * 5,
            Math.log10(1+{{Company.AnnualRevenue}}) * 3


          The reason the FBMath.sum extension exists is that JavaScript Math doesn't have an exact equivalent, but for just about every other (and more complex) function it's there in Math.


          With the exception of our custom extensions, the FlowBoost library is the native JS function library which is reproduced peerlessly on MDN!