Skip to content

Commit

Permalink
fix javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonasVali committed Apr 28, 2019
1 parent bfc5ca2 commit 4eb8485
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public interface DeviationProvider {
* Point is added to single trajectory point and it will not have any effect in the next
* mouse movement step, making it easy to implement this as a formula based on the input parameters.
* e.g the something like 'deviation = totalDistanceInPixels / completionFraction', resulting in smooth movement.
* (Don't actually use this formula), 'Noise' from the {@link (com.github.joonasvali.naturalmouse.api.NoiseProvider)}
* is generating an offset from the original trajectory and is accumulating.
* (Don't actually use this formula), 'Noise' is generating an offset from the original trajectory and is accumulating.
*
* As deviation should be deterministic and return same result for same parameters, it should not include Random
* behaviour, thus Random is not included as a parameter.
Expand All @@ -32,6 +31,7 @@ public interface DeviationProvider {
* target and initial position. This is not the final deviation of the mouse as MouseMotion will randomly decide
* to either amplify or decrease it over the whole mouse movement, making the resulting arc stand out more or less,
* or is flipped negatively.
* @see com.github.joonasvali.naturalmouse.api.NoiseProvider
*/
DoublePoint getDeviation(double totalDistanceInPixels, double completionFraction);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface NoiseProvider {
* Noise is accumulating, so on average it should create an equal chance of either positive or negative movement
* on each axis, otherwise the mouse movement will always be slightly offset to single direction.
*
* Deviation from {@link (com.github.joonasvali.naturalmouse.api.DeviationProvider)} is different from the Noise
* Deviation from DeviationProvider is different from the Noise
* because it works like a mathematical function and is not accumulating.
*
* Not every step needs to add noise, use randomness to only add noise sometimes, otherwise return Point(0, 0).
Expand All @@ -31,6 +31,8 @@ public interface NoiseProvider {
* @return a point which describes how much the mouse offset is increased or decreased this step.
* This value must not include the parameters xStepSize and yStepSize. For no change in noise just return (0,0).
*
* @see com.github.joonasvali.naturalmouse.api.DeviationProvider
*
*/
DoublePoint getNoise(Random random, double xStepSize, double yStepSize);
}

0 comments on commit 4eb8485

Please sign in to comment.