{"id":13564626,"url":"https://github.com/terkel/mathsass","last_synced_at":"2026-02-22T01:05:04.804Z","repository":{"id":8014095,"uuid":"9422673","full_name":"terkel/mathsass","owner":"terkel","description":"A Sass implementation of mathematical functions.","archived":false,"fork":false,"pushed_at":"2022-12-06T14:39:35.000Z","size":141,"stargazers_count":221,"open_issues_count":7,"forks_count":16,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-02-12T02:14:00.565Z","etag":null,"topics":["math","sass"],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terkel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-14T01:21:52.000Z","updated_at":"2026-02-01T13:23:57.000Z","dependencies_parsed_at":"2022-08-06T04:15:53.751Z","dependency_job_id":null,"html_url":"https://github.com/terkel/mathsass","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/terkel/mathsass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terkel%2Fmathsass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terkel%2Fmathsass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terkel%2Fmathsass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terkel%2Fmathsass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terkel","download_url":"https://codeload.github.com/terkel/mathsass/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terkel%2Fmathsass/sbom","scorecard":{"id":874377,"data":{"date":"2025-08-11","repo":{"name":"github.com/terkel/mathsass","commit":"63eb16a27279193f1183469f88b741837b625b03"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 2/17 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"33 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-957j-59c2-j692","Warn: Project is vulnerable to: GHSA-m5pj-vjjf-4m3h","Warn: Project is vulnerable to: GHSA-j383-35pm-c5h4","Warn: Project is vulnerable to: GHSA-rm36-94g8-835r","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-7xfp-9c55-5vqj","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-x6fg-f45m-jf5q","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f523-2f5j-gfcg","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-v2p6-4mp7-3r9v","Warn: Project is vulnerable to: GHSA-g78m-2chm-r7qv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T05:25:03.256Z","repository_id":8014095,"created_at":"2025-08-24T05:25:03.256Z","updated_at":"2025-08-24T05:25:03.256Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29701973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T23:35:04.139Z","status":"ssl_error","status_checked_at":"2026-02-21T23:35:03.832Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["math","sass"],"created_at":"2024-08-01T13:01:33.813Z","updated_at":"2026-02-22T01:05:04.784Z","avatar_url":"https://github.com/terkel.png","language":"CSS","readme":"# MathSass [![NPM version](https://badge.fury.io/js/mathsass.png)](http://badge.fury.io/js/mathsass) [![Build Status](https://travis-ci.org/terkel/mathsass.png?branch=master)](https://travis-ci.org/terkel/mathsass) [![Dependency Status](https://david-dm.org/terkel/mathsass.png)](https://david-dm.org/terkel/mathsass) [![devDependency Status](https://david-dm.org/terkel/mathsass/dev-status.png)](https://david-dm.org/terkel/mathsass#info=devDependencies)\n\nA Sass implementation of mathematical functions.\n\n## Install\n\n#### Git\n\n```\ngit clone git@github.com:terkel/mathsass.git \u0026\u0026 cd mathsass\n```\n\n#### Bower\n\n```\nbower install mathsass --save-dev\n```\n\n#### npm\n\n```\nnpm install mathsass --save-dev\n```\n\n## Usage\n\nImport `dist/_math.scss` partial to the Sass document.\n\n```scss\n@import \"path/to/dist/math\";\n\n.content {\n    height: 200px;\n    width: 200px / tan(60deg); // 115.47005px\n}\n```\n\nIf you installed via Npm the path will be: `node_modules/mathsass/dist/math`\n\nIf you installed via Bower the path will be: `bower_components/mathsass/dist/math`\n\n\n## Features\n\n\n### Constants\n\n* `$E` - Euler's constant (ネイピア数 [オイラー数])\n* `$PI` - π (円周率)\n* `$LN2` - The natural logarithm of 2 (2 の自然対数)\n* `$SQRT2` - The square root of 2 (2 の平方根)\n\n\n### Functions\n\n\n#### Exponentiation\n\n* `pow($base, $exp)`\n\n```scss\n@debug pow(4, 2);   // 16\n@debug pow(4, -2);  // 0.0625\n@debug pow(4, 0.2); // 1.31951\n```\n\n\n#### Factorial\n\n* `fact($x)`\n\n```scss\n@debug fact(4); // 24\n@debug fact(8); // 40320\n```\n\n\n#### Square root\n\n* `sqrt($x)`\n\n```scss\n@debug sqrt(2); // 1.41421\n@debug sqrt(3); // 1.73205\n```\n\n\n#### Exponential function\n\n* `exp($x)`\n* `frexp($x)`\n* `ldexp($x, $exp)`\n\n```scss\n@debug exp(-1); // 0.36788\n@debug exp(0);  // 1\n@debug exp(1);  // 2.71828\n```\n\n\n#### Logarithms\n\n* `log($x, $b: null)`\n\n```scss\n@debug log(2);     // 0.69315\n@debug log(10);    // 2.30259\n@debug log(2, 10); // 0.30103\n```\n\n\n#### Trigonometric functions\n\n* `sin($x)` - Sine (正弦)\n* `cos($x)` - Cosine (余弦)\n* `tan($x)` - Tangent (正接)\n* `csc($x)` - Cosecant (余割)\n* `sec($x)` - Secant (正割)\n* `cot($x)` - Cotangent (余接)\n\nIf argument has `deg` unit, converted to `rad`.\n\n```scss\n@debug tan(0.5236); // 0.57735\n@debug tan(30deg);  // 0.57735\n```\n\n\n#### Inverse trigonometric functions\n\n* `asin($x)` - Arcsine (逆正弦)\n* `acos($x)` - Arccosine (逆余弦)\n* `atan($x)` - Arctangent (逆正接)\n* `atan2($y, $x)` - Arctangent of the quotient of its arguments (引数の比率での逆正接)\n\n```scss\n@debug atan2(0, 0);       // 0\n@debug atan2(0, -0.0);    // 3.14159\n@debug atan2(-0.0, 0);    // 0\n@debug atan2(-0.0, -0.0); // -3.14159\n```\n\n#### Greatest common divisor and least common multiple\n\n* `gcd($a, $b)` - Greatest common divisor (最大公約数)\n* `lcm($a, $b)` - Least common multiple (最小公倍数)\n\n```scss\n@debug gcd(54, 24); // 6\n@debug lcm(30, 42); // 210\n```\n\n### Helper functions\n\n* `strip-unit($number)`\n* `deg-to-rad($deg, $unit: true)`\n* `rad-to-deg($rad, $unit: true)`\n* `unitless-rad($angle)`\n\n```scss\n@debug rad-to-deg(1.0472);       // 60.00014deg\n@debug deg-to-rad(60deg);        // 1.0472rad\n@debug deg-to-rad(60deg, false); // 1.0472\n@debug unitless-rad(60deg);      // 1.0472\n@debug unitless-rad(1.0472rad);  // 1.0472\n```\n\n\n## References\n\n* [adambom/Sass-Math · GitHub](https://github.com/adambom/Sass-Math)\n* [Team-Sass/Sassy-math · GitHub](https://github.com/Team-Sass/Sassy-math)\n* [Math - JavaScript | MDN](https://developer.mozilla.org/docs/JavaScript/Reference/Global_Objects/Math)\n* [404 Blog Not Found:javascript - Mathを再発明してみた](http://blog.livedoor.jp/dankogai/archives/51518565.html)\n* [C言語による最新アルゴリズム事典](http://www.amazon.co.jp/dp/4874084141?tag=terkel-22)\n\n…and Wikipedia articles:\n\n* [Exponentiation](http://en.wikipedia.org/wiki/Exponentiation), [冪乗 (累乗)](http://ja.wikipedia.org/wiki/%E5%86%AA%E4%B9%97)\n* [Factorial](http://en.wikipedia.org/wiki/Factorial), [階乗](http://ja.wikipedia.org/wiki/%E9%9A%8E%E4%B9%97)\n* [Square root](http://en.wikipedia.org/wiki/Square_root), [平方根](http://ja.wikipedia.org/wiki/%E5%B9%B3%E6%96%B9%E6%A0%B9)\n* [Exponential function](http://en.wikipedia.org/wiki/Exponential_function), [指数関数](http://ja.wikipedia.org/wiki/%E6%8C%87%E6%95%B0%E9%96%A2%E6%95%B0)\n* [Logarithm](http://en.wikipedia.org/wiki/Logarithm), [対数](http://ja.wikipedia.org/wiki/%E5%AF%BE%E6%95%B0)\n* [Trigonometric functions](http://en.wikipedia.org/wiki/Trigonometric_functions), [三角関数](http://ja.wikipedia.org/wiki/%E4%B8%89%E8%A7%92%E9%96%A2%E6%95%B0)\n* [Inverse trigonometric functions](http://en.wikipedia.org/wiki/Inverse_trigonometric_functions), [逆三角関数](http://ja.wikipedia.org/wiki/%E4%B8%89%E8%A7%92%E9%96%A2%E6%95%B0#.E9.80.86.E4.B8.89.E8.A7.92.E9.96.A2.E6.95.B0)\n* [Greatest common divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor), [最大公約数](https://ja.wikipedia.org/wiki/%E6%9C%80%E5%A4%A7%E5%85%AC%E7%B4%84%E6%95%B0)\n* [Least common multiple](https://en.wikipedia.org/wiki/Least_common_multiple), [最小公倍数](https://ja.wikipedia.org/wiki/%E6%9C%80%E5%B0%8F%E5%85%AC%E5%80%8D%E6%95%B0)\n* [Degree (angle)](http://en.wikipedia.org/wiki/Degree_\\(angle\\)), [度 (角度)](http://ja.wikipedia.org/wiki/%E5%BA%A6_\\(%E8%A7%92%E5%BA%A6\\))\n* [Radian](http://en.wikipedia.org/wiki/Radian), [ラジアン](http://ja.wikipedia.org/wiki/%E3%83%A9%E3%82%B8%E3%82%A2%E3%83%B3)\n\n## Contributing\n\nMake sure you have [node.js](http://nodejs.org/) and [grunt](http://gruntjs.com/getting-started) installed.\n\n**Clone Repository**\n```\ngit clone git@github.com:terkel/mathsass.git\n```\n\n**Install Dependencies**\n```\nnpm install\n```\n\n**Run Sass/Tests**\n```\ngrunt\n```\n\n## Credits\n\nOriginally created with help from [@kaminaly](https://github.com/kaminaly) and [@pilssalgi](https://github.com/pilssalgi).\n\n\n## License\n\nCopyright (c) 2013 [Takeru Suzuki](http://terkel.jp/)\nLicensed under the [MIT license](http://www.opensource.org/licenses/MIT).\n","funding_links":[],"categories":["CSS"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterkel%2Fmathsass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterkel%2Fmathsass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterkel%2Fmathsass/lists"}