37 lines
929 B
Kotlin
37 lines
929 B
Kotlin
package params
|
|
|
|
|
|
/**
|
|
* Data class to hold wiggle parameters for mouse movement.
|
|
*
|
|
* This simple data class holds two integer properties for x and y wiggle amounts.
|
|
* These are used when generating simulated mouse movements to add some variance
|
|
* and randomness to the coordinates.
|
|
*
|
|
* For example, if a target destination point is (100, 200), the wiggle params
|
|
* might generate an actual movement point like (102, 198) to add some randomness.
|
|
*
|
|
* Usage:
|
|
*
|
|
* ```
|
|
* val controller = DesktopController()
|
|
* val wiggle = WiggleParams(xWiggle = 10, yWiggle = 15)
|
|
*
|
|
* val target = Point(100, 200)
|
|
* val actual = controller.getAlmostPoint(target, wiggle) // (104, 197)
|
|
* ```
|
|
*
|
|
* @param xWiggle The max amount of variance in x direction. Default 25.
|
|
* @param yWiggle The max amount of variance in y direction. Default 25.
|
|
*/
|
|
data class MouseWiggleParams(
|
|
val xWiggle: Int = 25,
|
|
val yWiggle: Int = 25
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|