Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/question/depreciate"

Index

Functions

Functions

questionDepreciate

  • questionDepreciate(points: number, depreciation: number): number
  • Performs depreciation of question points. When a user gets a question wrong we want the points to reduce to encourage them to get the questions correct.

    Parameters

    • points: number

      the current points available for the question in the interval, ℝ+

    • depreciation: number

      the points to subtract, or, the multiplier to reduce the points by. The depreciation is used as a multiplier in the interval [0, 1) and a delta in the interval (1, +∞)

    Returns number

    the depreciated points in the interval [0, +∞)