Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Complex#fdiv
(::Numeric) -> ::Complex
fdiv(numeric) → new_complex
complex.c
View on GitHub ↗
static VALUE
nucomp_fdiv(VALUE self, VALUE other)
{
return f_divide(self, other, f_fdiv, id_fdiv);
}
Returns Complex.rect(self.real/numeric, self.imag/numeric):
Example
Complex.rect(11, 22).fdiv(3) # => (3.6666666666666665+7.333333333333333i)