feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.58k stars 142 forks source link

convert elevation map to a compile-time value instead of lazy #555

Open knickish opened 1 year ago

knickish commented 1 year ago

TITLE - Convert elevation map to a compile-time value instead of lazily initialized value

Status

Description

Converts the elevation weight map to use soft floats. This ensures that map is the same on all architectures as hardware specific floating point quirks are ignored, and allows it to be computed at compile time. A test is included with the old code to show that the result is unchanged.

Related issues

Leave empty if none

Checklist

Note: if you locally don't get any errors, but GitHub Actions fails (especially at clippy) you might want to check your rust toolchain version. You can then feel free to fix these warnings/errors in your PR.