code cleanup

This commit is contained in:
Simon Gardling
2022-04-05 09:14:35 -04:00
parent e427e7a04e
commit 6f1d64ea02
7 changed files with 56 additions and 72 deletions

View File

@@ -20,10 +20,11 @@ pub const BUILD_INFO: &str = formatc!(
/// Range of acceptable input values for integral_num
pub const INTEGRAL_NUM_RANGE: RangeInclusive<usize> = 1..=50000;
/// Minimum X value for calculating an Integral
pub const INTEGRAL_X_MIN: f64 = -1000.0;
/// Maximum X value for calculating an Integral
/// Maximum X value for calculating an Integral
pub const INTEGRAL_X_MAX: f64 = 1000.0;
const_assert!(INTEGRAL_X_MAX > INTEGRAL_X_MIN);
@@ -40,7 +41,6 @@ pub const DEFAULT_RIEMANN: Riemann = Riemann::Left;
pub const DEFAULT_MIN_X: f64 = -10.0;
/// Default Maxmimum X value to display
pub const DEFAULT_MAX_X: f64 = 10.0;
const_assert!(DEFAULT_MAX_X > DEFAULT_MIN_X);
@@ -48,7 +48,10 @@ const_assert!(DEFAULT_MAX_X > DEFAULT_MIN_X);
/// Default number of integral boxes
pub const DEFAULT_INTEGRAL_NUM: usize = 100;
pub const COLORS: &'static [Color32; 14] = &[
/// Colors used for plotting
// Colors commented out are used elsewhere and are not included here for better
// user experience
pub const COLORS: &[Color32; 14] = &[
Color32::RED,
// Color32::GREEN,
// Color32::YELLOW,