# Something to do with tangent

**URL:** <https://forum.makecode.com/t/something-to-do-with-tangent/3914>\
**Category:** Help\
**Created:** [October 16, 2020, 1:02pm UTC](https://forum.makecode.com/t/something-to-do-with-tangent/3914 "2020-10-16T13:02:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 16, 2020, 3:22pm UTC](https://forum.makecode.com/t/something-to-do-with-tangent/3914/2 "2020-10-16T15:22:51Z")

</div>

You’re looking for the `atan2` function.

> **[Math.atan2()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2)**
>
> The Math.atan2() function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0,0) to the point (x,y), for Math.atan2(y,x).

Here’s a demo with a duck and some pizza. 🙂

> **[Trig Demo](https://arcade.makecode.com/68113-67145-98748-20357)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I had a conversation in another thread where I discussed some trig basics: [Game Math](https://forum.makecode.com/t/game-math/2934)

As always, if you have any questions, just holler!

---

_[View the full topic](https://forum.makecode.com/t/something-to-do-with-tangent/3914)._
