Function toRoundedString

  • Converts num to a string, removing trailing digits that were likely caused by precision errors.

    Parameters

    • num: number

    Returns string

    Example

    import { toRoundedString } from '@js-draw/math';
    
    console.log('Rounded: ', toRoundedString(1.000000011));
    

Generated using TypeDoc

OpenSource licenses