]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MINICERN/packlib/kernlib/kerngen/tcgens/vunit.F
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / MINICERN / packlib / kernlib / kerngen / tcgens / vunit.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1996/02/15 17:50:18 mclareni
6* Kernlib
7*
8*
9#include "kerngen/pilot.h"
10 SUBROUTINE VUNIT (A,B,N)
11C
12C CERN PROGLIB# F121 VUNIT .VERSION KERNFOR 1.0 710701
13C ORIG. 01/07/71
14C
15 DIMENSION A(*),B(*)
16C
17 IF (N.LE.0) RETURN
18 XX= 0.
19 DO 9 I=1,N
20 9 XX= XX + A(I)*A(I)
21 IF (XX.LE.0.) RETURN
22 YY=1./ SQRT (XX)
23 DO 19 I= 1,N
24 19 B(I)=A(I) * YY
25 RETURN
26 END