[Cg1] [CG1] min max definition

강효승 fordicus at naver.com
Sat Oct 29 01:05:26 CEST 2016


[1] min and max on a vector should apply the minimum/maximum operation component-wise.
[2] Vector min(const Vector& a, const Vector& b)
{
	if (a.lensqr() <= b.lensqr()) return a;
	else return b;
}
 
 
Q >> [1] is on the assignment-sheet, which explains min and max on "A" vector.
But referring to the given framework's header file "vector.h" or similarly "point.h",
min(), max() functions have their 2 vectors or 2 points as their arguments.
 
So they are conflicting to each other as [1 vector/point] VS [2 vectors/points].
Which is correct? Is the implementation in [2] enough? ( Just finding larger/smaller one ).
 
 
 
 
 
 
 
 
 
===============================================================
http://maschine.systems/cv
HyoSeung Robin Kang
B.Eng. [ Electronics ][ Advanced Materials ]

Visual Computing,
Dept. of Computer Science, 
Universität Saarland,
Saarbrücken, Germany.
http://www.master-visual-computing.de/

Mobile  :  015-7763-43806 ( +49 15776343806 )
Email  : fordicus at naver.com 
===============================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.cg.uni-saarland.de/pipermail/cg1/attachments/20161029/1c627315/attachment-0001.html>


More information about the Cg1 mailing list