Sha256: 3aa0806504ebd2cf8652e31cd68b7602d42e103840151db4340f5a7f8be9eae8

Contents?: true

Size: 305 Bytes

Versions: 31

Compression:

Stored size: 305 Bytes

Contents

// Returns $x * 2^$exp
// @param {Number} $x
// @param {Number} $exp
@function ldexp ($x, $exp){
  $b: if($exp >= 0, 2, 1 * .5);

  @if $exp < 0{
    $exp: $exp * -1;
  }

  @while $exp > 0{
    @if $exp % 2 == 1{
      $x: $x * $b;
    }
    $b: $b * $b;
    $exp: floor($exp * .5);
  }

  @return $x;
}

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-admin-0.27.9 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.8 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.7 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.6 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.26.10 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.26.9 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.5 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.26.8 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.4 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.3 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.26.7 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.26.5 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.2 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.1 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.26.4 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.0 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.26.3 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.0.rc2 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.27.0.rc1 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.26.2 app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss