1
Extension { #name : #Float }
3
{ #category : #'*DrGeoII-Core-fixing' }
4
Float >> arcTan2: denominator [
5
"Answer the angle in radians.
6
Optional. See Object documentation whatIsAPrimitive."
11
ifTrue: [(denominator > 0.0)
12
ifTrue: [ result := 0 ]
13
ifFalse: [ result := Pi ]]
14
ifFalse: [(denominator = 0.0)
15
ifTrue: [ (self > 0.0)
16
ifTrue: [ result := Halfpi ]
17
ifFalse: [ result := Halfpi negated ]]
18
ifFalse: [ (denominator > 0)
19
ifTrue: [ result := (self / denominator) arcTan ]
21
ifTrue: [result := ((self / denominator) arcTan) + Pi ]
22
ifFalse: [result := ((self / denominator) arcTan) - Pi]]