Skip to content

brightoncollege.lib Analysis

12sliu edited this page Dec 20, 2023 · 3 revisions

Joystick Mapping

brightoncollege.lib has joystick mappings which take in a joystick input (-1.0 to 1.0) and return a value.

https://www.desmos.com/calculator/5pdt1mjqid Here is a link to a Desmos graph that showcases all of the joystick mappings. Only look at the interval from x = -1.0 to x = 1.0.

Math.signum() has been added to some of the mappings (Cos and Square) to better demonstrate their actual usage. If you want to use these two mappings, apply that first.

In order:

  1. Red - Cos
  2. Blue - Linear
  3. Green - Cubic
  4. Purple - Square
  5. Black - Root (suspect that this is bugged, ignore)

z is the inputScale that is used by Root. It is unknown what z should be in an actual use case, so ignore z going from 1 to 5.

Linear is what is usually applied to joystick (no changes). The others apply minor changes that may be handy for some functions. Root is bugged and should be completely ignored.

Clone this wiki locally