RetroArch
Public Attributes | List of all members
joystick_t Struct Reference

Joystick calibration structure. More...

#include <wiiuse.h>

Collaboration diagram for joystick_t:
[legend]

Public Attributes

struct vec2b_t max
 
struct vec2b_t min
 
struct vec2b_t center
 
struct vec2b_t pos
 
float ang
 
float mag
 

Detailed Description

Joystick calibration structure.

The angle ang is relative to the positive y-axis into quadrant I and ranges from 0 to 360 degrees. So if the joystick is held straight upwards then angle is 0 degrees. If it is held to the right it is 90, down is 180, and left is 270.

The magnitude mag is the distance from the center to where the joystick is being held. The magnitude ranges from 0 to 1. If the joystick is only slightly tilted from the center the magnitude will be low, but if it is closer to the outter edge the value will be higher.

Member Data Documentation

◆ ang

float joystick_t::ang

angle the joystick is being held

◆ center

struct vec2b_t joystick_t::center

center joystick values

◆ mag

float joystick_t::mag

magnitude of the joystick (range 0-1)

◆ max

struct vec2b_t joystick_t::max

maximum joystick values

◆ min

struct vec2b_t joystick_t::min

minimum joystick values

◆ pos

struct vec2b_t joystick_t::pos

raw position values


The documentation for this struct was generated from the following file: