Back to all rules
What this rule checks
Uses Processing's PVector class (declaration, parameter, new, or static call)
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
float positionX = 10;
float positionY = 20;
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  positionX = positionX + 1;
  ellipse(positionX, positionY, 10, 10);
}
FAIL — this code triggers the rule
PVector position;
void setup() {
  size(400, 400);
  position = new PVector(10, 20);
}

void draw() {
  background(255);
  position.add(1, 0);
  ellipse(position.x, position.y, 10, 10);
}
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.HasPVectorRule
Message template PVector is used.