# Add a custom cast?

**URL:** <https://discourse.processing.org/t/add-a-custom-cast/22995>\
**Category:** Development\
**Created:** [August 2, 2020, 3:46pm UTC](https://discourse.processing.org/t/add-a-custom-cast/22995 "2020-08-02T15:46:49Z")\
**Posts on this page:** 1\
**Showing post:** 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:** [August 2, 2020, 3:46pm UTC](https://discourse.processing.org/t/add-a-custom-cast/22995/1 "2020-08-02T15:46:49Z")

</div>

Hi I’m making a math library and it includes a matrix class.  
I wish to make it possible to cast it from a float[][]. Something like this:

```auto
float[][] a={{1,2},{3,4}};
Matrix m=(Matrix) a;

```

---

_[View the full topic](https://discourse.processing.org/t/add-a-custom-cast/22995)._
