mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
remove unused generatePerLetterRotation function
This commit is contained in:
parent
a1a91c1686
commit
41c07b2f99
@ -291,16 +291,6 @@ public class WatermarkRandomizer {
|
||||
return availableShadings.get(random.nextInt(availableShadings.size()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random rotation for per-letter orientation within a safe range.
|
||||
*
|
||||
* @param maxRotation Maximum rotation angle in degrees (applied as +/- range)
|
||||
* @return Random rotation angle in degrees
|
||||
*/
|
||||
public float generatePerLetterRotation(float maxRotation) {
|
||||
return -maxRotation + random.nextFloat() * (2 * maxRotation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random color from a limited palette.
|
||||
*
|
||||
|
||||
@ -652,20 +652,6 @@ class WatermarkRandomizerTest {
|
||||
fixedRotation, rotation, "Should return fixed rotation when min equals max");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should generate per-letter rotation within symmetric range")
|
||||
void testGeneratePerLetterRotation() {
|
||||
WatermarkRandomizer randomizer = new WatermarkRandomizer(TEST_SEED);
|
||||
float maxRotation = 30f;
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
float rotation = randomizer.generatePerLetterRotation(maxRotation);
|
||||
assertTrue(
|
||||
rotation >= -maxRotation && rotation <= maxRotation,
|
||||
"Per-letter rotation should be within +/- maxRotation");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should generate per-letter rotation in specified range")
|
||||
void testGeneratePerLetterRotationInRange() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user