---
name: "CL_InputHat"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_InputHat"
---

# CL\_InputHat(3)

Joystick hat interface.

## NAME

CL\_InputHat - Joystick hat interface.

## DESCRIPTION

CL\_InputHat is the interface to the "hat" on a joystick.

## CLASS MEMBERS

- virtual **~CL\_InputHat**()

  - virtual float **get\_direction**()

  ## MEMBERS WITH DESCRIPTIONS

- virtual **~CL\_InputHat**()

  ```
  Description:
  ```

- virtual float **get\_direction**()

  ```
  Description:
  ```

  Returns the current direction of the hat (in degrees from 0-360). If the value returned is -1, the hat is centered.

  ```
  Return value:
  ```

  Current hat direction (degrees 0-360) or -1 if centered.

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
