LineSegment.st
changeset 2070 10147c8be5fb
parent 1548 036dd8e862d0
child 2125 c61d3499d19b
--- a/LineSegment.st	Mon Dec 08 13:13:05 2008 +0100
+++ b/LineSegment.st	Thu Dec 11 13:55:09 2008 +0100
@@ -9,9 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
-
-
 "{ Package: 'stx:libbasic2' }"
 
 Geometric subclass:#LineSegment
@@ -238,14 +235,16 @@
 !LineSegment methodsFor:'queries'!
 
 angle
-    "return the receiver's angle (in degrees) in a polar coordinate system."
+    "return the receiver's angle (in degrees) in a polar coordinate system.
+     The angle is counted counter-clock-wise, starting with 0 for a horizontal
+     line (i.e. 0@0 -> 100@0 has an angle of 0 and 0@0 -> 0@100 has an angle of 90)"
 
-    ^ (endPoint - startPoint) angle
+    ^ (endPoint - startPoint) degrees
 
     "
      (LineSegment from:0@0 to:100@0) angle
-     (LineSegment from:0@0 to:100@100) angle
-     (LineSegment from:0@0 to:0@100) angle
+     (LineSegment from:0@0 to:100@100) angle   
+     (LineSegment from:0@0 to:0@100) angle      
      (LineSegment from:0@0 to:-100@100) angle
      (LineSegment from:0@0 to:-100@0) angle
      (LineSegment from:0@0 to:-100@-100) angle
@@ -332,5 +331,5 @@
 !LineSegment class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/LineSegment.st,v 1.17 2005-04-12 15:15:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/LineSegment.st,v 1.18 2008-12-11 12:55:09 cg Exp $'
 ! !