-2
$\begingroup$

If I have a length or angle and type =, blender enters math mode where I can type equations to set the input of a transformation.

The only option I found is a very tedious $exp((1/2) * log(2))$ which there should be no reason to have to type. Can I not enter a simple radical instead?

$\endgroup$
  • 1
    $\begingroup$ I usually type sqrt(144) on my calculator instead of 144^(1/2). $\endgroup$ – 10 Replies Jan 13 '19 at 0:03
4
$\begingroup$

Blender uses Python as its script language, so you write the exponent like this:

2**(1/2)
$\endgroup$
3
$\begingroup$

Blender uses Python for scripts and is therefore subject to Python's syntax.

The ^ operator or caret operator in python (as well as many other languages) represents the bitwise XOR operation. You can find out more here:

https://stackoverflow.com/questions/2451386/what-does-the-caret-operator-in-python-do

If you want to know why programming languages feature ^ for XOR instead of exponents read here:

https://softwareengineering.stackexchange.com/questions/331388/why-was-the-caret-used-for-xor-instead-of-exponentiation

You want to use ** which is the exponent operator in Python

$\endgroup$
3
$\begingroup$

Found another...

The only option I found is a very tedious "exp((1/2)*log(2))" which there should be no reason to have to type.

sqrt(2)

There is also the power method,

pow(2, 0.5)
$\endgroup$
  • $\begingroup$ Isn't that what we type on calculators too? \s $\endgroup$ – 10 Replies Jan 13 '19 at 0:01
  • $\begingroup$ @10Replies also true. $\endgroup$ – Jaroslav Jerryno Novotny Jan 13 '19 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.