ixfx
    Preparing search index...

    Function normaliseByRect

    Normalises a point so it is on a 0..1 scale

    normaliseByRect({ x: 10, y: 10, width: 20, height: 40 }); 
    normaliseByRect({ x: 10, y: 10 }, 20, 40);
    normaliseByRect(10, 10, 20, 40);

    Point, or x

    y coord or width

    height or width

    height

    Point