diff options
| author | Omar Rizwan <omar@omar.website> | 2023-06-09 20:12:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-09 20:12:20 +0000 |
| commit | 1b46ba3ddd29bf2b3c0310f4a4c42e669fb41599 (patch) | |
| tree | 30e8579151a6883a006817f47ea2467856d21395 /virtual-programs | |
| parent | Remove extraneous protocols insertion (diff) | |
| parent | Remove keyboard hardcoding + cleanup contains fn (diff) | |
| download | folk-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.folk | 7 |
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 |
