remove unused generatePerLetterRotation function

This commit is contained in:
antonarhipov 2025-11-02 15:54:04 +02:00
parent a1a91c1686
commit 41c07b2f99
2 changed files with 0 additions and 24 deletions

View File

@ -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.
*

View File

@ -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() {