summaryrefslogtreecommitdiffstats
path: root/virtual-programs
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2023-06-09 20:12:20 +0000
committerGitHub <noreply@github.com>2023-06-09 20:12:20 +0000
commit1b46ba3ddd29bf2b3c0310f4a4c42e669fb41599 (patch)
tree30e8579151a6883a006817f47ea2467856d21395 /virtual-programs
parentRemove extraneous protocols insertion (diff)
parentRemove keyboard hardcoding + cleanup contains fn (diff)
downloadfolk-1b46ba3ddd29bf2b3c0310f4a4c42e669fb41599.tar.gz
folk-1b46ba3ddd29bf2b3c0310f4a4c42e669fb41599.zip
Merge pull request #37 from FolkComputer/cleanup
Keyboard cleanup
Diffstat (limited to 'virtual-programs')
-rw-r--r--virtual-programs/regions.folk7
1 files changed, 3 insertions, 4 deletions
diff --git a/virtual-programs/regions.folk b/virtual-programs/regions.folk
index 583e4681..313a48d2 100644
--- a/virtual-programs/regions.folk
+++ b/virtual-programs/regions.folk
@@ -59,16 +59,15 @@ namespace eval ::region {
lassign $r1 vertices edges
lassign $vertices a b c d
- # 0 <= dot(ab,ap) <= dot(ab,ab) && 0 <= dot(bc,bp) <= dot(bc,bc)
- set ab [vec2 sub $b $a]
+ set ab [vec2 sub $b $a]
set ap [vec2 sub $p $a]
set bc [vec2 sub $c $b]
set bp [vec2 sub $p $b]
set dot_abap [vec2 dot $ab $ap]
set dot_bcbp [vec2 dot $bc $bp]
- return [expr {0 <= $dot_abap && $dot_abap <= [vec2 dot $ab $ab] && \
- 0 <= $dot_bcbp && $dot_bcbp <= [vec2 dot $bc $bc]}]
+ expr {0 <= $dot_abap && $dot_abap <= [vec2 dot $ab $ab] && \
+ 0 <= $dot_bcbp && $dot_bcbp <= [vec2 dot $bc $bc]}
}
namespace export distance contains