Function __global->cns_points_to_voting_power

Definitions

sources/cns_polls_action2.php

  • Calculate how much voting power a certain amount of points has.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: float

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$points integer No No required parameter N/A N/A The number of points from which to calculate the voting power
$overrides array No No [] N/A N/A Array of option overrides (empty: no overrides)

Returns

  • The amount of voting power associated with the points
  • Type: float
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Calculate how much voting power a certain amount of points has.
 *
 * @param  integer $points The number of points from which to calculate the voting power
 * @param  array $overrides Array of option overrides (empty: no overrides)
 * @return float The amount of voting power associated with the points
 */

function cns_points_to_voting_power(int $points, array $overrides = []) : float