!****h* General_VKN/MidPt ! NAME ! MidPt -- Calculate the coordinates of the 3-D mid-point between ! 2 user provided mid-points. [MidPt.MBS] ! DESCRIPTION ! This module sums the coordinates of each provided point and ! divides the sum by 2 to locate the mid-point. ! SOURCE GLOBAL GEOMETRY MODULE MidPt( VAR VECTOR Pt1, Pt2, MidPoint); ! Mid-point return vector !*** ! ! Copyright 2006, John J. Hughes ! ! This source code file is part of the 'NGBproject' files which ! execute interactively under the 'VARKON' program, which is ! distributed under the terms of the GNU General Public License. ! ! The 'NGBproject' files are also distributed under the terms of ! the GNU GeneralPublic License. See the GNU General Public License n ! included ithe file name "COPYING.txt" in the Varkon ./app/NGB/doc ! directory for more details. ! VECTOR tmpPt; BEGINMODULE ! ~ Sum the first 2 values tmpPt:=Pt1+Pt2; ! ~ Calculate the midpoint MidPoint:=vec(tmpPt.x/2, tmpPt.y/2, tmpPt.z/2); ENDMODULE