/* * call-seq: * dvector.atan2(number) -> a_dvector * dvector.atan2(other) -> a_dvector * * When argument is a number, this operation returns a copy of _dvector_ with each entry x replaced by the angle whose tangent is x/_number_. * When argument is a vector, this operation returns a copy of _dvector_ with each entry x replaced * by the angle whose tangent is x divided by the corresponding entry in the _other_ vector. * * a = Dvector[ 1.1, -5.7, 12.7 ] * a.atan2(3.8) -> Dvector[ atan2(1.1, 3.8), atan2(-5.7,3.8), atan2(12.7,3.8) ] * b = Dvector[ 7.1, 4.9, -10.1 ] * a.atan2(b) -> Dvector[ atan2(1.1,7.1), atan2(-5.7,4.9), atan2(12.7,-10.1) ] */ VALUE dvector_atan2(VALUE ary, VALUE arg) {