Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::math::vector::addscaled Function
C++
Parameters 
Description 
P_POINT pr 
pointer to a result vector 
PC_POINT pv1 
pointer to vector
PC_POINT pv2 
pointer to vector
RCOORD k 
scalar quantity to apply to vector 2 when adding to vector 1. 

Adds a vector scaled by a scalar to another vector, results in a third vector.

The pointer to the result vector may be the same vector as vector 1 or vector 2.

_POINT result;
P_POINT v1 = _X;
P_POINT v2 = _Y;
RCOORD k = 1.414;
addscaled( result, v1, v2, k );
   
// result is ( 1, 1.414, 0 )
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!