Skip to content

Commit

Permalink
Fix comments for dampen
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Jun 8, 2024
1 parent d005758 commit e1320a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions inmath/dampen.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import std.traits : isFloatingPoint;
@safe pure nothrow @nogc:

/**
Smoothly dampens movement from pos to target.
Smoothly dampens movement from `current` to `target`.
This algorithm uses a simpler dampening formulae that doesn't take velocity in to account.
*/
Expand Down Expand Up @@ -44,7 +44,7 @@ V dampen(V, T)(V current, V target, T delta, T maxSpeed = 50) if(isVector!V && i
}

/**
Smoothly dampens movement from pos to target.
Smoothly dampens movement from `current` to `target`.
This algorithm uses a simpler dampening formulae that doesn't take velocity in to account.
*/
Expand Down Expand Up @@ -76,7 +76,7 @@ T dampen(T)(T current, T target, T delta, T maxSpeed = 50) if(isFloatingPoint!T)
}

/**
Smoothly dampens movement from pos to target.
Smoothly dampens movement from `current` to `target`.
This algorithm uses a critial damped harmonic oscillator to smooth values.
*/
Expand Down Expand Up @@ -121,7 +121,7 @@ V smoothDamp(V, T)(V current, V target, ref V currentVelocity, T smoothTime, T m
}

/**
Smoothly dampens movement from pos to target.
Smoothly dampens movement from `current` to `target`.
This algorithm uses a critial damped harmonic oscillator to smooth values.
*/
Expand Down
3 changes: 2 additions & 1 deletion inmath/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ module inmath;
public import inmath.linalg;
public import inmath.math;
public import inmath.util;
public import inmath.interpolate;
public import inmath.interpolate;
public import inmath.dampen;

0 comments on commit e1320a2

Please sign in to comment.