static int getShadowAlpha( double calculatedElevation, double widgetElevation) { if (widgetElevation > 0) { return 10 * calculatedElevation ~/ widgetElevation; } return 0; }