Java tutorial
//package com.java2s; public class Main { public static float density = 1; public static int dp(float value) { return (int) Math.ceil(density * value); } }