Metadata-Version: 2.4
Name: betterRound
Version: 1.10
Description-Content-Type: text/markdown
Dynamic: description
Dynamic: description-content-type

# <p align="center"> betterRound - A simple, small Python package for better rounding. </p>

<div align="center">

![version: 1.0](https://img.shields.io/badge/version-1.0-red) ![python version: 3.14 - 3.16](https://img.shields.io/badge/python_version-3.14_--_3.16-%233776AB?logo=python&logoColor=%23FFFFFF)

</div>

Be honest, the current round() function _ sucks _. Only rounding to units? That's why I have created betterRound. Here's how it works.

## Setup

Make sure that betterRound is installed (run ` pip install betterRound ` in your terminal), then add ` from betterRound import * `. Now you can use betterRound in your project!

## Usage

betterRound only includes one function - ` betterRound() `. ` betterRound() ` takes 3 inputs, ` betterRound(num, sf = 1, opt = "round") `. Num is the number to round. Any number should work. Negatives are kinda wierd as I just thought of it now and put in a quick fix, it should be fully fixed later. Sf stands for Significant Figure, and by default is 1, which means the first digit will be the only one that stays the same. For decimals, you dont need to increment your sf, as my code will do it for you, so if you wanted to round everything after the 4 in 329.**4**826, you would put 4, as it is the fourth number. Finally, opt is the option argument. It is converted into lowercase before used, so don't worry about that. There are 3 options;

1. Up/Ceiling - Always round up.
2. Down/Floor - Always round down.
3. Round/Anything else - If the number after the last sf is over 5, round up, otherwise round down.

## Examples

```
print(betterRound(928346, 4))
>> 928300

print(betterRound(111111, 1, up))
>> 200000
```

## Other Info
<p> Numbers like 00000 that become 0 as a python integer won't work, even if opt="up", as there wont be enough digits.</p>
