assert default values
This commit is contained in:
parent
6e281e0569
commit
583fb0e9c9
@ -37,6 +37,7 @@ ruzstd = { git = "https://github.com/KillingSpark/zstd-rs.git" }
|
||||
serde_json = "1.0.79"
|
||||
tracing = "0.1.32"
|
||||
itertools = "0.10.3"
|
||||
static_assertions = "1.1.0"
|
||||
|
||||
[build-dependencies]
|
||||
shadow-rs = "0.11.0"
|
||||
|
||||
@ -24,6 +24,9 @@ pub const INTEGRAL_X_MIN: f64 = -1000.0;
|
||||
/// Maximum X value for calculating an Integral
|
||||
|
||||
pub const INTEGRAL_X_MAX: f64 = 1000.0;
|
||||
|
||||
const_assert!(INTEGRAL_X_MAX > INTEGRAL_X_MIN);
|
||||
|
||||
/// Range of acceptable x coordinates for calculating an integral
|
||||
pub const INTEGRAL_X_RANGE: RangeInclusive<f64> = INTEGRAL_X_MIN..=INTEGRAL_X_MAX;
|
||||
|
||||
@ -39,5 +42,7 @@ pub const DEFAULT_MIN_X: f64 = -10.0;
|
||||
|
||||
pub const DEFAULT_MAX_X: f64 = 10.0;
|
||||
|
||||
const_assert!(DEFAULT_MAX_X > DEFAULT_MIN_X);
|
||||
|
||||
/// Default number of integral boxes
|
||||
pub const DEFAULT_INTEGRAL_NUM: usize = 100;
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
#![allow(clippy::unused_unit)] // Fixes clippy keep complaining about wasm_bindgen
|
||||
#![feature(const_mut_refs)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate static_assertions;
|
||||
|
||||
mod consts;
|
||||
mod egui_app;
|
||||
mod function;
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
#![feature(const_mut_refs)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate static_assertions;
|
||||
|
||||
mod consts;
|
||||
mod egui_app;
|
||||
mod function;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user