code: public static float getDensity(@NonNull final Context context) {
          Condition.INSTANCE.ensureNotNull(context, "The context may not be null");
          return context.getResources().getDisplayMetrics().density;
      }
docs: Returns the logical density of the device's display.
  <p>
  This is a scaling factor for the density-independent pixel unit, where one DIP is one pixel
  on an approximately 160 dpi screen (for example a 240x320, 1.5"x2" screen), providing the
  baseline of the system's display. Thus on a 160dpi screen this density value will be 1; on a
  120 dpi screen it would be .75; etc.
  
  @param context
  The context, which should be used, as an instance of the class {@link Context}. The
  context may not be null
  @return The logical density of the device's display as a {@link Float} value