def value(self):
normal = self.__value - self.zero_value
if self.__value > 0:
normal = normal / (self.VAR_MAX - self.zero_value)
else:
normal = -normal / (self.VAR_MIN - self.zero_value)
if isclose(normal, 0, abs_tol=0.04):
return 0
return normal
评论列表
文章目录