# Vector Math Blocks Extension

**URL:** <https://forum.makecode.com/t/vector-math-blocks-extension/94>\
**Category:** Arcade\
**Tags:** extension\
**Created:** [March 17, 2019, 4:03pm UTC](https://forum.makecode.com/t/vector-math-blocks-extension/94 "2019-03-17T16:03:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [March 17, 2019, 4:03pm UTC](https://forum.makecode.com/t/vector-math-blocks-extension/94/1 "2019-03-17T16:03:46Z")

</div>

I’ve created a small extension to deal with vector manipulation. I’ve needed to calculate a vector between objects rather frequently in my other projects, so I threw this together to make those manipulations simpler in the future. The extension has a blocks interface, as well.

This library actually would be a nice project for students with an Algebra II or higher background to create in JavaScript (especially if you remove the blocks interface). It’s small enough to be manageable, but has some interesting math and could be incorporated into a larger project.

Extension URL (for importing into your projects): [https://github.com/robo-technical-group/pxt-arcade-vector-math.git](https://github.com/robo-technical-group/pxt-arcade-vector-math.git)

See it in action here:

> **[Vectors Playground](https://arcade.makecode.com/37666-67976-81998-57686)**
>
> Made with ❤️ in MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Mr\_Noonan](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@Mr\_Noonan](https://forum.makecode.com/u/Mr_Noonan)\
**Post date:** [March 17, 2019, 9:56pm UTC](https://forum.makecode.com/t/vector-math-blocks-extension/94/2 "2019-03-17T21:56:55Z")

</div>

Exactly what I needed for my tank shooter. Now the enemies can head to the main player. Thanks!
