Rough solution in Creative category for Moore Neighbourhood by LukeSolo
f=lambda m,x,y:0<=x Oct. 4, 2014 Comments: veky on Oct. 4, 2014, 8:07 a.m. <p>.71 is nice. Couldn't .8 work too? :-)</p> <p>Also, 0<=y< len(m[x]) wouldn't cost you a char, yet would be more explicit. ;-)</p> <p>And those int() calls would be more appropriate in []s at the end of first line. Lines length would be more balanced. ;-)</p> LukeSolo on Oct. 4, 2014, 9:13 a.m. <p>Hm, didn't test it. But this will be very rough. :D</p> <p>Without int() in second line, comparisons in first line gives wrong answers. :) </p> veky on Oct. 4, 2014, 9:42 a.m. <blockquote> <p>this will be very rough. :D</p> </blockquote> <p>I thought that was the point. :-D</p> <blockquote> <p>comparisons give wrong results</p> </blockquote> <p>Ah, yes. Sorry.</p> flex on Oct. 11, 2014, 12:09 a.m. <p>Hi.I can't understand how it works(. Can you write, what formula did you use?</p> LukeSolo on Oct. 12, 2014, 1:55 a.m. <p>Hi. I've used rotation matrix.</p> <p>|cos(a) -sin(a)|</p> <p>| sin(a) cos(a)|</p> flex on Oct. 12, 2014, 2:54 a.m. <p>Thanks</p> springulum on Jan. 19, 2015, 12:11 a.m. <p>lol rotation matrix??? XD</p>
Oct. 4, 2014
Comments: