Jump to content
  • Advertisement
Sign in to follow this  
Dragon_Strike

IvI vs IIvII

This topic is 4252 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

in all my pgraphic programming books the length of a vector is written as ||v|| bbut in my regular math books its written as just the absolute value |v| which one is correct and why?

Share this post


Link to post
Share on other sites
Advertisement
Both are correct. In my experience ||x|| is used when you're taking the magnitude of a vector, and |x| is used for scalars, but I've also seen |x| used on vectors without any ambiguity. I personally use |x| all around just because all those extra vertical lines can be a bit verbose. Imagine writing out the dot product ||x||||y||cos(θ). You can barely read it.

It's really just a matter of notational preference, the same way mathematicians use i for the imaginary root while engineers use j.

Share this post


Link to post
Share on other sites
Double bars are often used to indicate a matrix norm, with single bars used for a vector. Often the bars will be accompanied by a subscript to indicate the type of norm, e.g., you might see:


|x|2


for the L-2 norm.

Zipster is correct, though. Often you might see these interchanged in different books or references. Best to read the up-front material, since most books will define what this book means by double or single bars.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!