getHeight static method
Get the proportionate height as per screen size.
If screen height is 640px
, pixels
is 20px
,
y
= 640 / 20
= 32
,
Return 640 / 32
= 20
.
Implementation
static double getHeight(double pixels) {
return (pixels / height) * height;
}