package com.auto.clicker.autoclicker.util;

import android.graphics.Point;


public class ViewUtils {

    public static Point constrainToScreen(float x, float y, int maxWidth, int maxHeight) {
        int constrainedX = (int) Math.max(0, Math.min(x, maxWidth));
        int constrainedY = (int) Math.max(0, Math.min(y, maxHeight));
        return new Point(constrainedX, constrainedY);
    }
}