2 releases
0.1.5 | Mar 16, 2023 |
---|---|
0.1.4 |
|
#219 in Finance
53 downloads per month
13KB
282 lines
Example:
pub fn main() {
let min_height_min_width_price = 50.0; // Min All
let min_height_max_width_price = 60.0; // Max Width
let max_height_min_width_price = 70.0; // Max Height
let max_height_max_width_price = 80.0; // Max All,
let min_h = 1.0;
let max_h = 5.0;
let min_w = 1.0;
let max_w = 4.0;
let step_w = 0.5;
let step_h = 0.5;
let mut prices = CulcPrices::new(
&min_height_min_width_price,
&min_height_max_width_price,
&max_height_min_width_price,
&max_height_max_width_price,
&min_h,
&max_h,
&min_w,
&max_w,
&step_w,
&step_h
);
prices.culc_prices_table(false);
println!("\n{}", prices);
prices.culc_prices_table(true);
println!("\n{}", prices);
}
Output:
50.00 51.67 53.33 55.00 56.67 58.33 60.00
52.50 54.17 55.83 57.50 59.17 60.83 62.50
55.00 56.67 58.33 60.00 61.67 63.33 65.00
57.50 59.17 60.83 62.50 64.17 65.83 67.50
60.00 61.67 63.33 65.00 66.67 68.33 70.00
62.50 64.17 65.83 67.50 69.17 70.83 72.50
65.00 66.67 68.33 70.00 71.67 73.33 75.00
67.50 69.17 70.83 72.50 74.17 75.83 77.50
70.00 71.67 73.33 75.00 76.67 78.33 80.00
H/W 1.00 1.50 2.00 2.50 3.00 3.50 4.00
1.00 50.00 51.67 53.33 55.00 56.67 58.33 60.00
1.50 52.50 54.17 55.83 57.50 59.17 60.83 62.50
2.00 55.00 56.67 58.33 60.00 61.67 63.33 65.00
2.50 57.50 59.17 60.83 62.50 64.17 65.83 67.50
3.00 60.00 61.67 63.33 65.00 66.67 68.33 70.00
3.50 62.50 64.17 65.83 67.50 69.17 70.83 72.50
4.00 65.00 66.67 68.33 70.00 71.67 73.33 75.00
4.50 67.50 69.17 70.83 72.50 74.17 75.83 77.50
5.00 70.00 71.67 73.33 75.00 76.67 78.33 80.00