static_cast

Applies to: cpp

static_cast performs an explicit compile-time checked conversion between compatible C++ types.

double x = static_cast<double>(ticks) / ticks_per_rev;

See also: data-type, cast