Skip to content

Commit

Permalink
Fix example in 12.4.6
Browse files Browse the repository at this point in the history
- Change atan to atan2 in the argument, since the number of arguments is wrong otherwise.
  • Loading branch information
perost committed Dec 4, 2020
1 parent 7457cb6 commit 8eec738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ \subsection{Scalar Functions Applied to Array Arguments}\label{scalar-functions-
\begin{lstlisting}[language=modelica]
sin({a, b, c}) = {sin(a), sin(b), sin(c)} // argument is a vector
sin([a, b, c]) = [sin(a), sin(b), sin(c)] // argument may be a matrix
atan({a, b, c}, {d, e, f}) = {atan(a, d), atan(b, e), atan(c, f)}
atan2({a, b, c}, {d, e, f}) = {atan2(a, d), atan2(b, e), atan2(c, f)}
\end{lstlisting}
This works even if the function is declared to take an array as
one of its arguments. If \lstinline!pval! is defined as a function that takes
Expand Down

0 comments on commit 8eec738

Please sign in to comment.