-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support following a way in PathCreationActionMode
Fixes #1936
- Loading branch information
1 parent
a57b912
commit 9fde3fa
Showing
12 changed files
with
1,198 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
293 changes: 248 additions & 45 deletions
293
src/main/java/de/blau/android/easyedit/PathCreationActionModeCallback.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package de.blau.android.util; | ||
|
||
/** | ||
* Android doesn't have floor mode before API 24 | ||
*/ | ||
public final class MathUtil { | ||
|
||
/** | ||
* Private constructor | ||
*/ | ||
private MathUtil() { | ||
// empty | ||
} | ||
|
||
/** | ||
* Floor modulus | ||
* | ||
* See Math.floorMod | ||
* | ||
* @param x dividend | ||
* @param y dividor | ||
* @return the floor modulus of x and y | ||
*/ | ||
public static int floorMod(int x, int y) { | ||
int r = x / y; | ||
if ((x ^ y) < 0 && (r * y != x)) { | ||
r--; | ||
} | ||
return x - r * y; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.