# toDmgValue | pokemon-rogue-battle
Documentation for pokemon-rogue-battle

# Function toDmgValue

- toDmgValue(value: number, minValue?: number): number

  This function is used in the context of a Pokémon battle game to calculate the actual integer damage value from a float result. Many damage calculation formulas involve various parameters and result in float values. The actual damage applied to a Pokémon's HP must be an integer. This function helps in ensuring that by flooring the float value and enforcing a minimum damage value.

  #### Parameters

  - value: number

    The float value to convert.

  - minValue: number = 1

    The minimum integer value to return. Defaults to 1.

  #### Returns number

  The converted value as an integer.

  - Defined in src/utils.ts:573