In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use math.sqrt in vue". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the idea of Xiaobian slowly and deeply to study and learn "how to use math.sqrt in vue" together!
In vue, the "math.sqrt" method is used to return the square root of a number, which is a built-in method of math, and if the number is set to negative, the result is NaN, and the syntax is "math.sqrt(numeric value)."
Operating environment: Windows 10 system, Vue2.9.6 version, DELL G3 computer.
What is the use of math.sqrt in vue?
The sqrt() method returns the square root of a number.
The syntax is:
Math.sqrt(x)
If x is negative, NaN is returned.
Examples are as follows:
var a = Math.sqrt(0); var b = Math.sqrt(1); var c = Math.sqrt(9); var d = Math.sqrt(64); var e = Math.sqrt(-9);
Output:
0138NaN
Extended knowledge:
Math built-in methods
// Math built-in method// 1 random() returns a number from 0 to 1, excluding 1console.log (Math.random());// 2 round() returns a rounded number console.log (Math.round(1.6)); // 2// 3 abs()console.log (Math.abs(-2.566)); // 2.566// 4 floor()console.log (Math.floor(2.3)); // 2// 5 ceil()console.log (Math.ceil(2.1)); // 3// 6 max() minconsole.log (Math.max(1,2,3,7,8,9,5)); // 9console.log (Math.min(1,2,3,7,8,9,5)); // 1// 7 PIconsole.log (Math.PI); // 3.141592653589793// 8 pow(base, power) console.log (Math.pow(2,3)); 8// 9 sqrt() console.log (Math.sqrt(4)); // 2 Thank you for reading, the above is the content of "how to use math.sqrt in vue". After studying this article, I believe that everyone has a deeper understanding of how to use math.sqrt in vue. The specific use situation still needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 244
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.