From: Larry W. V. <lv...@ca...> - 2001-12-12 13:31:58
|
From: Christian Heide Damm <da...@da...> >> How many points in multiline? How many lines (multiline sounds like >> multiple lines...) > >I know 'multiline' is a bad name. What it meant is a line with bends. >Does anybody have a better name? Would "polyline" be appropriate? >> > # ::math::geometry::length >> > # >> > # Find the length of the line (x1,y1),(x2,y2),...,(xn,yn). >> >> I assume that this is "find the length of the line segment >> from x1,y1 -> xn,yn" ? > >No, it is the sum of the lengths of the individual line segments. So then this is a multiline, and not technically a line? Or is this yet another kind of figure? > A line is always defined by exactly two points. If the routines are going to require that one only provide two, and not more, points, it would be worthwhile mentioning that restriction/requirement/ basic assumption, in light of all the multiline alternatives also supported. > How about if I put something at the top of the file about lines, line segments, and > multilines, and that they are defined by so many points. Then I can just write That's a wonderful idea. It would really be helpful to also provide examples of what valid values are for each of the items. Also , I highly recommend that you document what is returned in error conditions as well. > The second problem: I could put the type float/int at all relevant places, or I could > again just write at the top of the file that everything related to coordinates and > distances are floating point values? Again, a one time mention is fine - but examples showing what to expect are going to be very helpful. -- Never apply a Star Trek solution to a Babylon 5 problem. Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |