Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Oct 25, 2023
1 parent 3695ffb commit 53ab023
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/dn/M.hx
Original file line number Diff line number Diff line change
Expand Up @@ -336,19 +336,16 @@ class M {
/**
* Returns the nearest power of two value
*/
inline public static function nearestPow2( x:Int )
{
inline public static function nearestPow2(x:Int) {
return Math.pow( 2, Math.round( Math.log( x ) / Math.log( 2 ) ) );
}

/**
* Linear interpolation over interval a...b with t = 0...1
*/
inline public static function lerp(a:Float, b:Float, t:Float):Float
{
return a + (b - a) * t;
/** Linear interpolation over interval a...b with t = 0...1 **/
inline public static function lerp(from:Float, to:Float, t:Float) : Float {
return from + (to - from) * t;
}


/**
* Spherically interpolates between two angles.
* See <a href="http://www.paradeofrain.com/2009/07/interpolating-2d-rotations/" target="_blank">http://www.paradeofrain.com/2009/07/interpolating-2d-rotations/</a>.
Expand Down

0 comments on commit 53ab023

Please sign in to comment.