[][src]Module tokyo::geom

Traits

PointExt

Extension methods for the Point type alias.

RadianExt

Extension methods for the Radian type alias.

VectorExt

Extension methods for the Vector type alias.

Type Definitions

Point

A point inside the game arena, in terms of pixels. See euclid documentation for its API, but you can assume all the basic linear algebra operations are supported e.g. addition, subtraction, and interpolation (aka lerp).

Radian

The game server expects angles to be in radians. See euclid documentation for its API, but you'll mostly need new to create and get to retrieve radians. Radian::degrees method crates Radian from a value in degrees, which may be handy. Radian::positive may also be useful if you want to normalize the radian to be [0, 2PI).

Vector

A vector inside the game arena, in terms of pixels. It's mostly used to represent a velocity. See euclid documentation for its API, but you can assume all the basic linear algebra operations are supported e.g. addition, subtraction, magnitude (aka length), angle conversion (aka angle_from_x_axis), dot and cross product.