MCHPR / MCHPRS

A multithreaded Minecraft server built for redstone.
MIT License
1.56k stars 67 forks source link

Teleport to infinity and NaN! #67

Closed gabriel-doriath-dohler closed 2 years ago

gabriel-doriath-dohler commented 2 years ago

Coordinates are parsed to IEEE754 floats with Rust's parse method, which allows for infinity, -infinity, inf, -inf, nan and -nan (and is not case-sensitive).

This causes some weird behavior such as:

gabriel-doriath-dohler commented 2 years ago

Relevant documentation on the parsing of floats in Rust: https://doc.rust-lang.org/std/primitive.f64.html#grammar with the correction https://github.com/rust-lang/rust/commit/4c17217f99250892f859d2859aa0f17e949a6ebc

AL1L commented 2 years ago

I say keep this as a feature 😉