Back to all rules
What this rule checks
Uses rotate() for coordinate transformations
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
float angle = 0;

void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  angle = angle + 0.05;
  line(200, 200, 200 + cos(angle) * 100, 200 + sin(angle) * 100);  // cos/sin place the end
}
FAIL — this code triggers the rule
float angle = 0;

void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  angle = angle + 0.05;
  translate(200, 200);
  rotate(angle);
  line(0, 0, 100, 0);
}
Overview
Category Out of Scope
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.HasRotateRule
Message template rotate() usage found.