Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Where is the function that normalizes a Vector_3?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Where is the function that normalizes a Vector_3?


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Where is the function that normalizes a Vector_3?
  • Date: Wed, 6 Sep 2017 14:32:13 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:9FMBLRNGAjQDifTvCRsl6mtUPXoX/o7sNwtQ0KIMzox0K/T/rarrMEGX3/hxlliBBdydsK0UzbeO+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6a8TWO6msZFRz7cAZ0Pe/oAZX6jsKt1un09YeATR9PgW/3Wr54JQ6qrAjX/u0Rm4plNu5x5RbOp3ZUYfV4zGh0IkiC3ly0sty0+4Ri9DgWvvYJ+MtJUKG8dKM9G+8LRA86Onw4sZW4/SLIShGCsyMR
  • Organization: GeometryFactory

On 09/05/2017 06:10 PM, Iasonm wrote:
I want to normalize a Vector_3 and I cant the function that does the job.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

There is none (the main reason being that it is not an exact operation).
You can use the squared_length() member function as below (provided you have a kernel with sqrt supported):

v=v/std::sqrt(v.squared_length());

Sebastien.



Archive powered by MHonArc 2.6.18.

Top of Page