We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 718b9a6 commit 61f5bd4Copy full SHA for 61f5bd4
src/Math-Quaternion/PMQuaternion.class.st
@@ -354,11 +354,15 @@ PMQuaternion >> ln [
354
| z |
355
z := self unreal abs.
356
^ z isZero
357
- ifTrue: [ self abs ln + (z arcTan: qr) i + qj j + qk k ]
+ ifTrue: [
358
+ | vectorPart |
359
+ vectorPart := 0 + (z arcTan: qr) i + qj j + qk k.
360
+ self abs ln + vectorPart ]
361
ifFalse: [
- | theta |
362
+ | theta vectorPart |
363
theta := (z arcTan: qr) / z.
- self abs ln + (theta * (0 + qi i + qj j + qk k)) ]
364
+ vectorPart := theta * (0 + qi i + qj j + qk k).
365
366
]
367
368
{ #category : #'mathematical functions' }
0 commit comments