Compare commits

3 Commits

Author SHA1 Message Date
t d6ebe272db chore: remove flake.nix 2026-02-15 11:52:22 +01:00
t 2b1c2cd9d4 style: fmt 2026-02-15 11:52:12 +01:00
t 504bfa9bfe chore: use rust edition 2024 2026-02-15 11:51:13 +01:00
3 changed files with 2 additions and 30 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
name = "simple-easing"
version = "1.0.1"
description = "Set of simple easing functions"
edition = "2021"
edition = "2024"
repository = "https://gitlab.com/chpio/simple-easing"
license = "MIT OR Apache-2.0"
include = [
-24
View File
@@ -1,24 +0,0 @@
{
description = "simple-easing";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShell = pkgs.mkShell {
name = "simple-easing";
buildInputs = with pkgs; [
cargo
rustc
rustfmt
rust-analyzer
];
};
}
);
}
+1 -5
View File
@@ -62,9 +62,5 @@ pub fn reverse(t: f32) -> f32 {
/// assert!((ascending - descending).abs() < 0.001);
/// ```
pub fn roundtrip(t: f32) -> f32 {
if t < 0.5 {
t * 2.0
} else {
(1.0 - t) * 2.0
}
if t < 0.5 { t * 2.0 } else { (1.0 - t) * 2.0 }
}