import math


def round_to_decimals(num, decs):
    """
    Round floating point number to some number of decimals
    """
    factor = math.pow(10.0, decs)
    return math.trunc(num * factor) / factor