Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds built-in clamp() and hypot() #906

Merged
merged 4 commits into from Dec 26, 2019
Merged

Adds built-in clamp() and hypot() #906

merged 4 commits into from Dec 26, 2019

Conversation

Awjin
Copy link
Contributor

@Awjin Awjin commented Dec 20, 2019

* Adds clamp(), div(), and hypot().
* Parses -0 as a double.
@Awjin Awjin requested a review from nex3 December 20, 2019 21:24
CHANGELOG.md Show resolved Hide resolved
lib/src/functions/math.dart Outdated Show resolved Hide resolved
lib/src/functions/math.dart Outdated Show resolved Hide resolved
lib/src/functions/math.dart Outdated Show resolved Hide resolved
lib/src/functions/math.dart Outdated Show resolved Hide resolved
lib/src/parse/stylesheet.dart Outdated Show resolved Hide resolved
var unit1 = "${min.hasUnits ? "has units" : "is unitless"}";
var unit2 = "${min.hasUnits ? "is unitless" : "has units"}";
throw SassScriptException(
"$arg1 $unit1 but $arg2 $unit2. Arguments must all have units or all be unitless.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also include the names of the arguments in question here—it may not be obvious from context.

Also, this is a long line (the formatter won't break strings for you).

Same below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

lib/src/parse/stylesheet.dart Outdated Show resolved Hide resolved
lib/src/functions/math.dart Outdated Show resolved Hide resolved
@Awjin Awjin changed the title Adds built-in math functions. Adds built-in clamp() and hypot() Dec 24, 2019
@Awjin Awjin merged commit 24f84e2 into master Dec 26, 2019
@Awjin Awjin deleted the math-clamp-div-hypot branch December 26, 2019 20:40
jathak added a commit that referenced this pull request Jan 2, 2020
Awjin added a commit that referenced this pull request Jan 14, 2020
Awjin added a commit that referenced this pull request Jan 15, 2020
Awjin added a commit that referenced this pull request Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants