Hi, how can we help you today?

Webapp Influence to API Strength conversion

Some parameters have different names or scales between the web interface and the API. The most notable example is the conversion between "Influence" (web) and "Strength" (API)

Overview

  • Influence: A value ranging from 1 to 100 displayed in the webapp interface

  • Strength: The corresponding API parameter, ranging from 0.01 to 1.00

Conversion Formula

The conversion between Influence and Strength follows this formula:

Strength = 1 - Influence + 0.01

Quick Reference Table

Here are some example conversions:

Converting Values

From Influence to Strength

To convert an Influence value to its corresponding Strength:

  1. Take your Influence value (1-100)

  2. Subtract it from 1

  3. Add 0.01

  4. Round to 2 decimal places


For example:
If Influence = 80 -> Strength = 1 - 80 + 0.01 = 0.21

Implementation


Here's the conversion function used in our system:

export const reverseStrength = (value: number): number => {
  return parseFloat((1 - value + 0.01).toFixed(2));
};

Important Notes

  • Influence values should always be whole numbers between 1 and 100

  • Strength values will always be between 0.01 and 1.00

  • Results are always rounded to 2 decimal places


If you encounter any issues with parameter conversion or have questions, please contact our support team for assistance.

Was this helpful?