To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Kaiochao.Atan2##version=0 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Kaiochao.Atan2##version=0 |
atan2(x, y) returns the smallest angle in clockwise degrees between the vector (0, 1) and the vector (x, y).
Given a vector from one point to another point, this gives you an angle in degrees. This angle can be used for getting a rotation matrix to point something toward something else using atom.transform. |
Please support BYOND through Membership or a donation!
Delta0Zero2: (Jul 25 2017, 1:29 am)
D4RK3 54B3R: (Jul 24 2017, 11:07 pm)
Wait why is it relative to (0, 1) and not (1, 0)?
|
Related Libraries
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
More Libraries by Kaiochao
|
Copyright © 2024 BYOND Software.
All rights reserved.