Crates.io | ulam |
lib.rs | ulam |
version | 0.5.2 |
source | src |
created_at | 2022-02-24 22:33:34.344874 |
updated_at | 2023-11-30 03:15:52.574494 |
description | Utility crate for ulam calculations. |
homepage | |
repository | https://github.com/miketwenty1/ulam/ |
max_upload_size | |
id | 538843 |
size | 23,942 |
Coord {
x: 1,
y: 0,
}
This Coord is equal the value of 1 if passed to the
let mut ulam_points = HashMap::new();
for x in -201..201 {
if x % 10 == 0 {
println!("{x}");
}
for y in -201..201 {
let c = Coord::new(x, y);
let a = ulam::get_ulam_point(&c);
ulam_points.insert(
a.value,
c
);
}
}
let c = Coord::new(20000, 20000);
let a = ulam::get_ulam_point(&c);
println!("{}", a.value);
println!("{:?}", ulam_points[&55]);
ulam::ulamspiral_img::generate(1_000, 1_000)
.unwrap()
.save("./result.png");