The ^
operator is the bitwise XOR operator. To square a value, use Math.pow
:
var altura2 = Math.pow($('#ddl_altura').attr("value")/100, 2);
More Related Contents:
- Get the percentage of a number with javascript [closed]
- Slope function error(sort-of)… again [closed]
- Which equals operator (== vs ===) should be used in JavaScript comparisons?
- What is the !! (not not) operator in JavaScript?
- JavaScript plus sign in front of function expression
- JavaScript % (modulo) gives a negative result for negative numbers
- JavaScript math, round to two decimal places [duplicate]
- javascript i++ vs ++i [duplicate]
- Javascript: formatting a rounded number to N decimals
- How to perform an integer division, and separately get the remainder, in JavaScript?
- Safe evaluation of arithmetic expressions in Javascript
- What is the JavaScript >>> operator and how do you use it?
- How can I remove the decimal part from JavaScript number?
- What is the fastest factorial function in JavaScript? [closed]
- What is the !! (not not) operator in JavaScript?
- When to use the double not (!!) operator in JavaScript
- What’s the algorithm to calculate aspect ratio?
- Adding to Number.MAX_VALUE
- What is the difference between != and !== operators in JavaScript?
- How can I specify the base for Math.log() in JavaScript?
- What does “somevar >> 0” mean?
- Calculating the shortest route between two points
- Float sum with javascript [duplicate]
- JS how to find the greatest common divisor [closed]
- JavaScript adding a string to a number
- How to find the least common multiple of a range of numbers?
- How to simplify a decimal into the smallest possible fraction?
- parseFloat rounding
- Why [] == [] is false in JavaScript?
- What does “!” operator mean in javascript when it is used with a non-boolean variable?