Sha256: 5f947806bfa0c2faa19a7438d16645146bca8b433449c66e9a307ffd0e69ef85

Contents?: true

Size: 344 Bytes

Versions: 106

Compression:

Stored size: 344 Bytes

Contents

// Returns $x * 2^$exp
// @param {Number} $x
// @param {Number} $exp
@function ldexp ($x, $exp) {
    $b: if($exp >= 0, 2, 1 / 2);
    @if $exp < 0 {
        $exp: $exp * -1;
    }
    @while $exp > 0 {
        @if $exp % 2 == 1 {
            $x: $x * $b;
        }
        $b: $b * $b;
        $exp: floor($exp * 0.5);
    }
    @return $x;
}

Version data entries

106 entries across 106 versions & 3 rubygems

Version Path
decidim-admin-0.5.0 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.5.0 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.4.4 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.4.4 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.4.3 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.4.2 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.4.1 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.4.3 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.4.2 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.4.1 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.4.0 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.4.0 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.3.2 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.3.2 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.3.1 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.3.1 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.3.0 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.3.0 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-admin-0.2.0 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss
decidim-0.2.0 decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss