pub static displayDensity: DisplayDensityInternalTypeExpand description
Returns the pixel density of the current display the sketch is running on.
Examples
function setup() {
let density = displayDensity();
pixelDensity(density);
createCanvas(100, 100);
background(200);
ellipse(width / 2, height / 2, 50, 50);
}