```  1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
```
```//! Macro definitions

/// Neatly construct a `Vec1` from arbitrary components
///
/// # Examples
///
/// ```
/// #[macro_use] extern crate coord;
/// use coord::prelude::*;
///
/// let my_vec = vec1!(7);         // Standard instantiation
/// let my_vec = vec1!((12));      // Tuple instantiation
/// let my_vec = vec1!([3.2]);     // Array slice instantiation
/// let my_vec = vec1!([true; 1]); // Array copy instantiation
/// ```
#[macro_export]
#[allow(unused_macros)]
macro_rules! vec1 {
(\$arr:expr) => (
Vec1::from(\$arr)
);

[\$arr:expr; 1] => (
Vec1::from([\$arr; 1])
);

(\$x:expr) => (
Vec1::new(\$x)
);
}

/// Neatly construct a `Vec2` from arbitrary components
///
/// # Examples
///
/// ```
/// #[macro_use] extern crate coord;
/// use coord::prelude::*;
///
/// let my_vec = vec2!(7, 9);       // Standard instantiation
/// let my_vec = vec2!((12, -4));   // Tuple instantiation
/// let my_vec = vec2!([3.2, 8.9]); // Array slice instantiation
/// let my_vec = vec2!([true; 2]);  // Array copy instantiation
/// ```
#[macro_export]
#[allow(unused_macros)]
macro_rules! vec2 {
(\$arr:expr) => (
Vec2::from(\$arr)
);

[\$arr:expr; 2] => (
Vec2::from([\$arr; 2])
);

(\$x:expr, \$y:expr) => (
Vec2::new(\$x, \$y)
);
}

/// Neatly construct a `Vec3` from arbitrary components
///
/// # Examples
///
/// ```
/// #[macro_use] extern crate coord;
/// use coord::prelude::*;
///
/// let my_vec = vec3!(7, 9, 2);         // Standard instantiation
/// let my_vec = vec3!((12, -4, 0));     // Tuple instantiation
/// let my_vec = vec3!([3.2, 8.9, 7.3]); // Array slice instantiation
/// let my_vec = vec3!([true; 3]);       // Array copy instantiation
/// ```
#[macro_export]
#[allow(unused_macros)]
macro_rules! vec3 {
(\$arr:expr) => (
Vec3::from(\$arr)
);

[\$arr:expr; 3] => (
Vec3::from([\$arr; 3])
);

(\$x:expr, \$y:expr, \$z:expr) => (
Vec3::new(\$x, \$y, \$z)
);
}

/// Neatly construct a `Vec4` from arbitrary components
///
/// # Examples
///
/// ```
/// #[macro_use] extern crate coord;
/// use coord::prelude::*;
///
/// let my_vec = vec4!(7, 9, 2, -5);           // Standard instantiation
/// let my_vec = vec4!((12, -4, 0, 9));        // Tuple instantiation
/// let my_vec = vec4!([3.2, 8.9, 7.3, -2.0]); // Array slice instantiation
/// let my_vec = vec4!([true; 4]);             // Array copy instantiation
/// ```
#[macro_export]
#[allow(unused_macros)]
macro_rules! vec4 {
(\$arr:expr) => (
Vec4::from(\$arr)
);

[\$arr:expr; 4] => (
Vec4::from([\$arr; 4])
);

(\$x:expr, \$y:expr, \$z:expr, \$w:expr) => (
Vec4::new(\$x, \$y, \$z, \$w)
);
}
```