We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f02ac85 commit 45c3dcaCopy full SHA for 45c3dca
macros/examples/example.rs
@@ -2,17 +2,20 @@
2
3
use inline_python_macros::ct_python;
4
5
-static DIRECTIONS: [(f64, f64); 32] = ct_python! {
+ct_python! {
6
+ print("static A: i32 = 1;")
7
+}
8
+
9
+static DIRECTIONS: [(f64, f64); 4] = ct_python! {
10
from math import sin, cos, tau
- n = 32
11
+ n = 4
12
print("[")
13
for i in range(n):
- x = cos(i / n * tau)
- y = sin(i / n * tau)
- print(f"({x}, {y}),")
14
+ print(f"({cos(i / n * tau)}, {sin(i / n * tau)}),")
15
print("]")
16
};
17
18
fn main() {
19
+ dbg!(&A);
20
dbg!(&DIRECTIONS);
21
}
0 commit comments