Improve the `math` bif
See original GitHub issueThere is an undocumented math
bif that can be used to access the Math
object in JS.
We need to write docs on it.
There is also a somewhat private, but accessible -math-prop
bif, we could actually make it so math
could be a shortcut both for the -math
and -math-prop
based on the number of arguments passed.
Issue Analytics
- State:
- Created 10 years ago
- Reactions:3
- Comments:19 (16 by maintainers)
Top Results From Across the Web
Math Tips: Top 5 Ways To Improve In Math Immediately
Improve in math by using these 5 areas to focus on. As a math teacher of over 20 years experience these areas are...
Read more >Strategies to Improve All Students' Mathematics Learning and ...
Strategies to improve all students' mathematics learning and achievement ... With a big smile, Ella said, “I'll just get another quarter and ...
Read more >11 Strategies for Accelerating Math Fluency
5. Use Memory Aids. Several memory aids such as songs, rhymes, and even name mnemonics may be helpful in increasing a student's math...
Read more >9 Ways to Improve Math Skills Quickly & Effectively
Need help to get better at math? Follow this guide to the best ways for improving mathematical skills.
Read more >5 Tips for Improving Students' Success in Math | Edutopia
What does it take to improve student success and interest in math? ... Because such problems are realistic, big, and messy, student teams ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @tjfwalker, bif means built in function—simply a function that is included in Stylus.
The
math
function accepts two arguments: a value to operate on, and a JavaScript math function to use. I have put some example on CodePen that demonstrate this.For example, you could call Math.sqrt in the following way:
This function is limited to having one value passed, which means you can’t use a JavaScript math function that accepts/requires multiple values (Math.min, for example). It might be worth reconsidering the implementation to allow this.
I’ve been trying to find documentation that explains the
math()
function used in this Codepen, http://codepen.io/kizu/pen/etmzx , without any luck. I finally found this issue, from nearly _two years ago_, stating that it’s *undocumented" BIF —built-in function. What’s the status on writing up the “math bif” documentation? How does it work, what are the args being passed tomath()
, et cetera? Thanks.