Skip to main content

round_away_from_one

Rounds the given value away from one to the nearest integer by applying a ceiling-style rounding to the difference from one and then shifting back.

def round_away_from_one(
value: number
) - > int

Rounds a numeric value to the next integer away from 1.0. This is typically used to ensure that fractional increments above a whole number result in the next higher integer magnitude relative to the baseline of one.

Parameters

NameTypeDescription
valuenumberThe numeric value or Decimal to be rounded.

Returns

TypeDescription
intThe resulting integer after rounding the input value away from one.