[TupleVariation] Minor optimization in compileCoord()
This commit is contained in:
parent
416ff89171
commit
48e827aa21
@ -157,11 +157,11 @@ class TupleVariation(object):
|
|||||||
return (b''.join(tupleData), auxData, usesSharedPoints)
|
return (b''.join(tupleData), auxData, usesSharedPoints)
|
||||||
|
|
||||||
def compileCoord(self, axisTags):
|
def compileCoord(self, axisTags):
|
||||||
result = []
|
result = bytearray()
|
||||||
for axis in axisTags:
|
for axis in axisTags:
|
||||||
_minValue, value, _maxValue = self.axes.get(axis, (0.0, 0.0, 0.0))
|
_minValue, value, _maxValue = self.axes.get(axis, (0.0, 0.0, 0.0))
|
||||||
result.append(struct.pack(">h", fl2fi(value, 14)))
|
result.extend(struct.pack(">h", fl2fi(value, 14)))
|
||||||
return b''.join(result)
|
return bytes(result)
|
||||||
|
|
||||||
def compileIntermediateCoord(self, axisTags):
|
def compileIntermediateCoord(self, axisTags):
|
||||||
needed = False
|
needed = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user