Sha256: 06992af225a0e67d1be8262b34e1580b2a34dfde7c1af35272ba943d3891b807

Contents?: true

Size: 477 Bytes

Versions: 106

Compression:

Stored size: 477 Bytes

Contents

// Returns a two-element list containing the normalized fraction and exponent of number.
// @param {Number} $x
// @return {List} fraction, exponent
@function frexp ($x) {
    $exp: 0;
    @if $x < 0 {
        $x: $x * -1;
    }
    @if $x < 0.5 {
        @while $x < 0.5 {
            $x: $x * 2;
            $exp: $exp - 1;
        }
    } @else if $x >= 1 {
        @while $x >= 1 {
            $x: $x / 2;
            $exp: $exp + 1;
        }
    }
    @return $x, $exp;
}

Version data entries

106 entries across 106 versions & 3 rubygems

Version Path
decidim-admin-0.24.3 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.23.6 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.24.2 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.23.5 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.24.1 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.24.0 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.24.0.rc2 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.23.4 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.24.0.rc1 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.23.3 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.23.2 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.23.1 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.23.1.rc1 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.23.0 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.22.0 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.21.0 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.20.1 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.20.0 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.19.1 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss
decidim-admin-0.18.1 app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss