aboutsummaryrefslogtreecommitdiff
path: root/server/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/lib.rs')
-rw-r--r--server/src/lib.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/server/src/lib.rs b/server/src/lib.rs
index 042fcb6c..79cdbeb3 100644
--- a/server/src/lib.rs
+++ b/server/src/lib.rs
@@ -15,7 +15,6 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-#![feature(if_let_guard, iterator_try_collect, stmt_expr_attributes, random)]
pub mod commands;
pub mod entity;
pub mod network;
@@ -24,7 +23,8 @@ pub mod server;
pub mod state;
use hurrycurry_protocol::glam::Vec2;
-use std::{fmt::Display, random::random};
+use rand::random;
+use std::fmt::Display;
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ConnectionID(pub i64);
@@ -49,9 +49,6 @@ impl InterpolateExt for f32 {
}
}
-fn random_float() -> f32 {
- random::<u32>(..) as f32 / u32::MAX as f32
-}
fn random_gauss() -> f32 {
- [(); 12].map(|()| random_float()).iter().sum::<f32>() - 6.
+ [(); 12].map(|()| random::<f32>()).iter().sum::<f32>() - 6.
}