Skip to content

Commit

Permalink
[#41] Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Orchaldir committed Sep 17, 2023
1 parent f2c35ce commit 2081feb
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions rpg_tools_rendering/src/rendering/equipment/pants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,9 @@ fn get_shorts(config: &RenderConfig, aabb: &AABB, body: &Body) -> Polygon2d {

fn get_shorter_pants(config: &RenderConfig, aabb: &AABB, body: &Body, factor: f32) -> Polygon2d {
let top_y = config.body.get_torso_bottom();
let bottom_y = config.pants.get_bottom_y(&config.body, body);
get_pants(
config,
aabb,
body,
interpolate(top_y, bottom_y, factor),
false,
)
let full_bottom_y = config.pants.get_bottom_y(&config.body, body);
let bottom_y = interpolate(top_y, full_bottom_y, factor);
get_pants(config, aabb, body, bottom_y, false)
}

fn get_pants(
Expand Down

0 comments on commit 2081feb

Please sign in to comment.