# Creating a class to extend Math

**URL:** <https://forum.kirupa.com/t/creating-a-class-to-extend-math/71924>\
**Category:** Uncategorized\
**Created:** [November 30, 2004, 7:33pm UTC](https://forum.kirupa.com/t/creating-a-class-to-extend-math/71924 "2004-11-30T19:33:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![icio](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/icio/32/484_2.png) [@icio](https://forum.kirupa.com/u/icio)\
**Post date:** [November 30, 2004, 7:33pm UTC](https://forum.kirupa.com/t/creating-a-class-to-extend-math/71924/1 "2004-11-30T19:33:49Z")

</div>

i have a function that i wrote in flash mx, and now that i’m using flash mx 2004, i’m going to have to use a class.

the function is like this:

```auto
//as 1.0:
function formatNumber(numberToFormat, decimalPlaces) {
//
}

```

how would i format that to put it into a class that extends the Math setion of as 2.0?
