def is_cursor_in_target(self):
if self.target_radius > 0:
return self.is_cursor_in_radius(self.target_radius)
else:
return float('nan')
float('nan') is truthy in Python, so callers using this value in a boolean context (track.py:78-83) will incorrectly treat "no target defined" as "cursor is in target". This causes wrong cursor color selection.
Consider returning False instead.
def is_cursor_in_target(self):
if self.target_radius > 0:
return self.is_cursor_in_radius(self.target_radius)
else:
return float('nan')
float('nan') is truthy in Python, so callers using this value in a boolean context (track.py:78-83) will incorrectly treat "no target defined" as "cursor is in target". This causes wrong cursor color selection.
Consider returning False instead.