def picometers(self, value): self._value = multiplyIfNotNone(value, MetricPrefix.Pico) return
def kilometers(self, value): self._value = multiplyIfNotNone(value, MetricPrefix.Kilo) return
def nanometers(self, value): self._value = multiplyIfNotNone(value, MetricPrefix.Nano) return
def micrometers(self, value): self._value = multiplyIfNotNone(value, MetricPrefix.Micro) return
def centimeters(self, value): self._value = multiplyIfNotNone(value, MetricPrefix.Centi) return
def __mul__(self, other): self.checkType( expectedType=NumberTypes, value=other, exceptionMessage='Lengths can only be multiplied by numbers.') return Length(meters=multiplyIfNotNone(self.meters, other))
def __neg__(self): return Length(meters=multiplyIfNotNone(self.meters, -1))