c++ - Why is the second argument of the function std::polar optional? -


a friend of mine using function std::polar believing takes 1 argument, corresponds argument (how confusing!) of returned complex number. know, not true, since function takes 2 argument, viz., modulus , argument. puzzles me fact second argument optional , defaults zero. when omit second argument, convert real number complex. when useful , why has been added specification (or part of spec)? after all, hadn't second argument been optional, wouldn't have wasted plenty of time spot bug.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -