change doc
Some checks failed
Rust Checks / checks (push) Waiting to run
Rust Checks / checks (pull_request) Has been cancelled

This commit is contained in:
CoCo_Sol 2024-03-05 17:55:19 +01:00
parent 29ba228716
commit ef6f553133

View file

@ -27,7 +27,7 @@ struct TilesGap(Vec2);
struct TilesSize(Vec2);
impl Tile {
/// Returns the texture handle of the tile.
/// Returns the handle of the image of the tile.
fn get_texture(&self, asset_server: &AssetServer) -> Handle<Image> {
match self {
Self::Grass => asset_server.load("tiles/grass.png"),
@ -95,7 +95,7 @@ fn render_map(
}
}
/// A simple sigmoid function to convert from y to z position.
/// A simple sigmoid function to convert y position to z position.
/// The return value is between 0 and 1.
fn z_position_from_y(y: f32) -> f32 {
-1.0 / (1.0 + (-y * 110_f64.powi(-5) as f32).exp())