isValidFor method
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;
}