Skip to content

Commit

Permalink
fix atan2 help
Browse files Browse the repository at this point in the history
closes pure-data/pddp#262

also makes it clearer for [expr]
  • Loading branch information
porres committed Dec 21, 2024
1 parent 1f5d456 commit 7aa06f5
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 47 deletions.
86 changes: 44 additions & 42 deletions doc/5.reference/expr-help.pd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#N canvas 537 36 745 701 12;
#N canvas 423 57 745 701 12;
#X declare -stdpath ./;
#N canvas 455 177 911 525 Arrays 0;
#X floatatom 123 393 4 0 9 0 - - - 0;
Expand Down Expand Up @@ -326,46 +326,33 @@
#X restore 130 350 pd Power-functions;
#N canvas 241 137 849 422 Trigonometric-functions 0;
#X floatatom 34 54 5 0 0 0 - - - 0;
#X floatatom 34 113 5 0 0 0 - - - 0;
#X floatatom 34 145 5 0 0 0 - - - 0;
#X floatatom 34 202 5 0 0 0 - - - 0;
#X floatatom 33 233 5 0 0 0 - - - 0;
#X floatatom 33 290 5 0 0 0 - - - 0;
#X obj 34 82 expr sin($f1);
#X obj 34 173 expr cos($f1);
#X obj 33 261 expr tan($f1);
#X floatatom 194 54 5 0 0 0 - - - 0;
#X floatatom 194 113 5 0 0 0 - - - 0;
#X floatatom 194 145 5 0 0 0 - - - 0;
#X floatatom 194 202 5 0 0 0 - - - 0;
#X obj 194 82 expr asin($f1);
#X obj 194 173 expr acos($f1);
#X text 83 52 sine;
#X text 85 145 cosine;
#X text 84 233 tangent;
#X floatatom 195 229 5 0 0 0 - - - 0;
#X floatatom 195 286 5 0 0 0 - - - 0;
#X text 261 52 arc sine;
#X text 256 145 arc cosine;
#X text 256 229 arc tangent;
#X floatatom 387 53 5 0 0 0 - - - 0;
#X floatatom 387 112 5 0 0 0 - - - 0;
#X floatatom 387 144 5 0 0 0 - - - 0;
#X floatatom 387 201 5 0 0 0 - - - 0;
#X floatatom 388 228 5 0 0 0 - - - 0;
#X floatatom 388 285 5 0 0 0 - - - 0;
#X floatatom 264 329 5 0 0 0 - - - 0;
#X floatatom 264 386 5 0 0 0 - - - 0;
#X floatatom 264 386 10 0 0 0 - - - 0;
#X obj 264 357 expr atan2($f1 \, $f2);
#X floatatom 401 329 5 0 0 0 - - - 0;
#X text 426 357 arc tangent of 2 variables;
#X obj 195 257 expr atan($f1);
#X floatatom 617 53 5 0 0 0 - - - 0;
#X floatatom 617 112 5 0 0 0 - - - 0;
#X floatatom 617 144 5 0 0 0 - - - 0;
#X floatatom 617 201 5 0 0 0 - - - 0;
#X floatatom 618 228 5 0 0 0 - - - 0;
#X floatatom 618 285 5 0 0 0 - - - 0;
#X text 741 66 inverse hyperbolic sine, f 10;
#X obj 617 81 expr asinh($f1);
#X obj 617 172 expr acosh($f1);
Expand All @@ -379,33 +366,48 @@
#X text 502 167 hyperbolic cosine, f 10;
#X text 501 76 hyperbolic sine, f 10;
#X text 112 12 All trigonometric functions expect the input in radians (except the arc or inverse ones)., f 89;
#X connect 0 0 6 0;
#X connect 2 0 7 0;
#X connect 4 0 8 0;
#X connect 6 0 1 0;
#X connect 7 0 3 0;
#X connect 8 0 5 0;
#X connect 9 0 13 0;
#X connect 11 0 14 0;
#X connect 13 0 10 0;
#X connect 14 0 12 0;
#X connect 18 0 34 0;
#X connect 23 0 47 0;
#X connect 25 0 48 0;
#X connect 27 0 49 0;
#X connect 29 0 31 0;
#X connect 31 0 30 0;
#X connect 32 0 31 1;
#X connect 34 0 19 0;
#X connect 35 0 42 0;
#X connect 37 0 43 0;
#X connect 39 0 44 0;
#X connect 42 0 36 0;
#X connect 43 0 38 0;
#X connect 44 0 40 0;
#X connect 47 0 24 0;
#X connect 48 0 26 0;
#X connect 49 0 28 0;
#X floatatom 618 285 10 0 0 0 - - - 0;
#X floatatom 33 290 10 0 0 0 - - - 0;
#X floatatom 195 286 10 0 0 0 - - - 0;
#X floatatom 388 285 10 0 0 0 - - - 0;
#X floatatom 34 202 10 0 0 0 - - - 0;
#X floatatom 194 202 10 0 0 0 - - - 0;
#X floatatom 387 201 10 0 0 0 - - - 0;
#X floatatom 617 201 10 0 0 0 - - - 0;
#X floatatom 34 113 10 0 0 0 - - - 0;
#X floatatom 194 113 10 0 0 0 - - - 0;
#X floatatom 387 112 10 0 0 0 - - - 0;
#X floatatom 617 112 10 0 0 0 - - - 0;
#X text 308 327 y;
#X text 444 328 x;
#X text 426 357 arc tangent of 2 coordinates (y-vertical / x-horizontal), f 28;
#X connect 0 0 3 0;
#X connect 1 0 4 0;
#X connect 2 0 5 0;
#X connect 3 0 49 0;
#X connect 4 0 45 0;
#X connect 5 0 42 0;
#X connect 6 0 8 0;
#X connect 7 0 9 0;
#X connect 8 0 50 0;
#X connect 9 0 46 0;
#X connect 13 0 24 0;
#X connect 17 0 34 0;
#X connect 18 0 35 0;
#X connect 19 0 36 0;
#X connect 20 0 22 0;
#X connect 22 0 21 0;
#X connect 23 0 22 1;
#X connect 24 0 43 0;
#X connect 25 0 29 0;
#X connect 26 0 30 0;
#X connect 27 0 31 0;
#X connect 29 0 52 0;
#X connect 30 0 48 0;
#X connect 31 0 41 0;
#X connect 34 0 51 0;
#X connect 35 0 47 0;
#X connect 36 0 44 0;
#X restore 130 379 pd Trigonometric-functions;
#N canvas 365 241 592 281 Store-function 0;
#X text 40 26 The store function is defined with "=" \, and it can store the result of any operation into a variable or table index.;
Expand Down
12 changes: 7 additions & 5 deletions doc/5.reference/trigonometric-help.pd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#N canvas 364 23 593 484 12;
#N canvas 496 86 593 484 12;
#X floatatom 159 250 4 0 0 0 - - - 0;
#X floatatom 122 341 8 0 0 0 - - - 0;
#X floatatom 122 250 4 0 0 0 - - - 0;
Expand Down Expand Up @@ -50,20 +50,19 @@
#X text 97 418 float -;
#X text 109 170 float - input value to the function and output result.;
#X text 110 533 1) float -;
#X text 155 457 right side input ('y' coordinate)., f 56;
#X text 153 418 left side input ('x' coordinate)., f 56;
#X text 188 533 initialize right inlet (default 0).;
#X text 23 16 Trigonometric functions:;
#X text 71 47 - calculate sine (input in radians)., f 66;
#X text 71 70 - calculate cosine (input in radians)., f 66;
#X text 71 93 - calculate tangent (input in radians)., f 66;
#X text 71 117 - calculate arc-tangent (input in radians)., f 66;
#X text 71 328 - calculate arc-tangent from coordinate pairs (x \, y)., f 66;
#X text 155 457 right side input ('x' coordinate)., f 56;
#X text 153 418 left side input ('y' coordinate)., f 56;
#X text 71 328 - calculate arc-tangent from coordinate pairs (y \, x)., f 66;
#X restore 419 21 pd reference;
#X text 517 20 <= click;
#X obj 6 56 cnv 1 585 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 6 395 cnv 1 585 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 238 267 The arc tangent ([atan]) takes two forms. The [atan2] version takes a coordinate pair (x \, y) and gives you an an angle in radians between -pi and pi. It also takes a bang message in the left inlet to evaluate the operation with the previously set values., f 47;
#X text 396 115 <-- convert to radians, f 11;
#X text 374 444 updated for Pd version 0.54;
#X text 198 20 - trigonometric functions;
Expand All @@ -73,6 +72,9 @@
#X text 398 409 (etc.) - binary operators;
#X text 50 443 (etc.) - other binary operators;
#X text 359 85 <-- degrees;
#X text 129 226 Y;
#X text 167 226 X;
#X text 234 262 The arc tangent ([atan]) takes two forms. The [atan2] version takes a coordinate pair (y-vertical / x-horizontal) and gives you an angle in radians between -pi and pi. It also takes a bang message in the left inlet to evaluate the operation with the values that were previously set., f 43;
#X connect 0 0 15 0;
#X connect 2 0 23 0;
#X connect 4 0 14 0;
Expand Down

0 comments on commit 7aa06f5

Please sign in to comment.