polar

Complex.polar(abs[, arg]) â complex
Class Public methods

Returns a complex object which denotes the given polar form.

1
2
3
4
Complex.polar(3, 0)            #=> (3.0+0.0i)
Complex.polar(3, Math::PI/2)   #=> (1.836909530733566e-16+3.0i)
Complex.polar(3, Math::PI)     #=> (-3.0+3.673819061467132e-16i)
Complex.polar(3, -Math::PI/2#=> (1.836909530733566e-16-3.0i)
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.