# Add method to float\[\]\[\]

**URL:** https://discourse.processing.org/t/add-method-to-float/24502
**Category:** Beginners
**Created:** [October 10, 2020, 7:19pm UTC](https://discourse.processing.org/t/add-method-to-float/24502 "2020-10-10T19:19:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![NumericPrime](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/numericprime/32/16318_2.png) [@NumericPrime](https://discourse.processing.org/u/NumericPrime)
#### Post date: [October 10, 2020, 7:19pm UTC](https://discourse.processing.org/t/add-method-to-float/24502/1 "2020-10-10T19:19:44Z")

</div>

I’m currently writing a Mathlibrary. And it is kind of annoying to always have to use

```auto
new Matrix(m)

```

it would be better if I could use something like

```auto
m.toMatrix()

```

Is there a possibility to do that?

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [October 11, 2020, 9:44am UTC](https://discourse.processing.org/t/add-method-to-float/24502/2 "2020-10-11T09:44:19Z")

</div>

I don’t think you can do this directly but you could make a class floatTupel

OR use PVector with extends, see reference
