DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetMousePointerAngle()

float GetMousePointerAngle ( )
protected

См. определение в файле RadialMenu.c строка 464

465 {
466 int mouse_x;
467 int mouse_y;
468 GetMousePos(mouse_x, mouse_y);
469
470 float center_x;
471 float center_y;
472 GetParentCenter(center_x, center_y);
473
474 float tan_x = mouse_x - center_x;
475 float tan_y = mouse_y - center_y;
476 float angle = Math.Atan2(tan_y, tan_x);
477
478 return angle;
479 }
void GetParentCenter(out float center_x, out float center_y)
Определения RadialMenu.c:386
Определения EnMath.c:7
static proto float Atan2(float y, float x)
Returns angle in radians from tangent.
proto void GetMousePos(out int x, out int y)

Перекрестные ссылки Math::Atan2(), GetMousePos() и GetParentCenter().

Используется в Update().