def __rmul__(self, y): if y is zero: return zero if isinstance(y, type(1)) or isinstance(y,type(1.0)): return scaleHPR(y, self) if getPtype(y).includes(numType): return scaleHPR(y, self) Errors.errorOnStaticTypes("Mul", "SHPR", y)
def __div__(self, y): if y is zero: print("Universal Explosion") return zero if isinstance(y, type(1)) or isinstance(y,type(1.0)): return scaleHPR((1.0/y), self) if getPtype(y).includes(numType): return scaleHPR((1.0/y), self) Errors.errorOnStaticTypes("Div", "SP2", y)