示例#1
0
 def kilometers(self):
     return divideIfNotNone(self._value, MetricPrefix.Kilo)
示例#2
0
 def picometers(self):
     return divideIfNotNone(self._value, MetricPrefix.Pico)
示例#3
0
 def nanometers(self):
     return divideIfNotNone(self._value, MetricPrefix.Nano)
示例#4
0
 def micrometers(self):
     return divideIfNotNone(self._value, MetricPrefix.Micro)
示例#5
0
 def centimeters(self):
     return divideIfNotNone(self._value, MetricPrefix.Centi)
示例#6
0
 def __truediv__(self, other):
     self.checkType(
         expectedType=NumberTypes,
         value=other,
         exceptionMessage='Lengths can only be multiplied by numbers.')
     return divideIfNotNone(self.meters, other.meters)