HaxeFlixel/engine — pull request #412 by Gama11 (2013-06-11 15:46:58+00:00)
Title: Introducing util package

(#138)

I created a new util package containing the following classes:
- `FlxColor` (previously `FlxColorUtils`, the powertools class has been renamed)
- `FlxMath` (deleted some functions that are contained in `Math`, contains functions from the powertools math class and math-related functions from `FlxU`, renamed that one)
- `FlxMisc` (everything from `FlxU` that didn't fit elsewhere, added documentation for `arrayIndexOf()` and `setArrayLength()`, made the functions name lowercase)
- `FlxRandom` (contains all functions related to randomness from `FlxU` and the powertools math class)
- `FlxString` (contains all the formatting-functions from `FlxU`)
- `FlxRect`
- `FlxPoint`
- `FlxTimer`

The old references to the colors in `FlxG` were dropped. `FlxU` is gone.

I also organized the imports of some classes, a lot had unneccesary ones.

These are the functions that were removed entirely because there really is no use for them:

- `FlxU.abs()`
- `FlxU.min()`
- `FlxU.max()`
- `FlxU.round()`
- `FlxU.ceil()`
- `FlxU.floor()`
- `FlxU.getClass()`
- `FlxMath.sqrt()`

Yes, this does screw over backwards compatiblity quite a bit. But better now than never. `FlxU` *was* cluttered, and this is way more organized than before. Doing this before 2.0 officially releases is the best time to do this.

I *should* have gotten all the references to `FlxU`, and everything seemed to compile fine to all targets tested (flash, windows, html5, android, neko). However, obviously not all classes were compiled, so I can't say that there aren't any issues with total certainty. This is quite a big change.