Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
code to identify whether particular coordinate lies in bbox
#tclsh 8.6 # THIS SCRIPT IDENTIFY WHETHER GIVEN COORDINATE IS INSIDE BBOX puts "GIVE YOUR BBOX DATA AS LR" #set LL [gets stdin] set LL "13 10" set LL_x [lindex $LL 0] set LL_y [lindex $LL 1] puts "GIVE YOUR BBOX DATA AS TR" #set TR [gets stdin] set TR "15 15" set TR_x [lindex $TR 0] set TR_y [lindex $TR 1] puts "LL_x:$LL_x LL_y:$LL_y TR_x:$TR_x TR_y:$TR_y" puts "GIVE x COORDINATE OF THE POINT" #set x [gets stdin] set x 12 puts "GIVE y COORDINATE OF THE POINT" #set y [gets stdin] set y 10 set x_d [expr $TR_x-$LL_x] puts "x dimension is $x_d" set y_d [expr $TR_y-$LL_y] puts "y dimension is $y_d" if { $x <= $TR_x && $x >= $LL_x && $y <= $TR_y && $y >= $LL_y} {puts " $x,$y lies inside boundary of $LL,$TR"} else {puts "ERROR: $x,$y lies OUTSIDE boundary of $LL,$TR"}
run
|
edit
|
history
|
help
0
Dec to binary addition
a
2
q1q0
XorShift On Tcl
dssd
binds
procedures.tcl
Perfect bin mul eo float
wewew