Directions#
The ordinal directions.
A collection of normalized vectors to be referenced by name.
Best used for the positions or facings of Sprites
.
- ppb.directions.Down = Vector(0.0, -1.0)#
Unit vector to the bottom of the screen from center.
- ppb.directions.DownAndLeft = Vector(-0.7071067811865475, -0.7071067811865475)#
Unit vector diagonally down and to the left of the screen from center.
- ppb.directions.DownAndRight = Vector(0.7071067811865475, -0.7071067811865475)#
Unit vector diagonally down and to the right of the screen from center.
- ppb.directions.Left = Vector(-1.0, 0.0)#
Unit vector to the left of the screen from center.
- ppb.directions.Right = Vector(1.0, 0.0)#
Unit vector to the right of the screen from center.
- ppb.directions.Up = Vector(0.0, 1.0)#
Unit vector to the top of the screen from center.
- ppb.directions.UpAndLeft = Vector(-0.7071067811865475, 0.7071067811865475)#
Unit vector diagonally up and to the left of the screen from center.
- ppb.directions.UpAndRight = Vector(0.7071067811865475, 0.7071067811865475)#
Unit vector diagonally up and to the right of the screen from center.