hp method

double hp(
  1. double percent
)

Converts a percentage of the screen height into logical pixels.

Implementation

double hp(double percent) {
  return height * percent / 100;
}