additional means of construction for constants
Open
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
This compiles with nalgebra 0.29.0:
```rust
const ZERO: Vector3 = Vector3::new(0.0, 0.0, 0.0);
```
but these do not:
```rust
const ZERO: Vector3 = Vector3::zeros();
const ZERO: Vector3 = Vector3::from_row_slice(&[0.0, 0.0, 0.0]);
// error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
```
It would be handy if additional means of [construction](https://nalgebra.org/docs/user_guide/vectors_and_matrices/) (e.g. zeros) could be used for constants.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.