isValidFor method

bool isValidFor(
  1. double rotY,
  2. double rotZ,
  3. double r
)

Check if the cache is still valid for the given parameters

Implementation

bool isValidFor(double rotY, double rotZ, double r) {
  // Use small epsilon for floating point comparison
  const epsilon = 0.0001;
  return (rotationY - rotY).abs() < epsilon &&
      (rotationZ - rotZ).abs() < epsilon &&
      (radius - r).abs() < epsilon;
}