Jump to content


- - - - -

two lines on each side of a variable


7 replies to this topic

#1 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1587 posts

Posted 11 January 2012 - 10:27 PM

I was looking at a formula and it had two lines on each side of a variable like
|| a ||

I know one on each side is absolute value, what is it when two are used?
Currently using Blender and Unity.

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 5307 posts
  • LocationSanta Clara, CA

Posted 11 January 2012 - 10:56 PM

Usually that means the length of a vector, or more generally in mathematics, a "norm" (generalization of the concept of vector length).

Some people use single bars for vector lengths as well, but some prefer to use two to distinguish scalars from vectors.
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1587 posts

Posted 11 January 2012 - 11:11 PM

OK, so it would be a normalized vector then? I think that's what I was reading about.
Currently using Blender and Unity.

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 5307 posts
  • LocationSanta Clara, CA

Posted 11 January 2012 - 11:13 PM

Usually ||x|| is just the length of x. If you saw x / ||x|| that would be normalize(x).

Some people also use a caret over a vector to mean normalization, like û would be normalize(u). Other kinds of decorations can be used too; there's not really a standard.
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1587 posts

Posted 11 January 2012 - 11:26 PM

Yeah, that's what it was. I also saw the caret. That clears the whole thing up then, thanks.
Currently using Blender and Unity.

#6 .oisyn

    DevMaster Staff

  • Moderators
  • 1842 posts

Posted 11 January 2012 - 11:52 PM

View PostReedbeta, on 11 January 2012 - 10:56 PM, said:

Some people use single bars for vector lengths as well, but some prefer to use two to distinguish scalars from vectors.
Or to distinguish between vector norm and set cardinality.
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#7 TheNut

    Senior Member

  • Moderators
  • 1701 posts
  • LocationCyberspace

Posted 12 January 2012 - 12:26 AM

I think in the mathematics world it is formally called magnitude. At least that's what I remember from my algebra days. Otherwise, all of the above = good.
http://www.nutty.ca - Being a nut has its advantages.

#8 }:+()___ (Smile)

    Member

  • Members
  • PipPipPip
  • 169 posts

Posted 12 January 2012 - 04:19 AM

Usually norm have definition in the beginning of mathematical article, as there are many kind of norms (see wikipedia):
||x||1 = sum |xi|,
||x||2 = sqrt(sum xi2),
||x|| = max |xi|.
Sorry my broken english!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users