Skip to content

Commit

Permalink
Merge pull request #16 from drnextgis/repr
Browse files Browse the repository at this point in the history
Remove hardcoded classname
  • Loading branch information
matiasg committed Jan 2, 2018
2 parents 10a0adc + 7c7141c commit ef0182d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quaternions/general_quaternion.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _squarenorm(self):
return self.qr * self.qr + self.qi * self.qi + self.qj * self.qj + self.qk * self.qk

def __repr__(self):
return 'GeneralQuaternion{}'.format(tuple(self.coordinates))
return '{}{}'.format(self.__class__.__name__, tuple(self.coordinates))

def __str__(self):
return '({qr:.6g}{qi:+.6g}i{qj:+.6g}j{qk:+.6g}k)'.format(**self.__dict__)
Expand Down

0 comments on commit ef0182d

Please sign in to comment.