The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled PHP Code
Posted by: Robert | November 1, 2010 @ 10:41pm
PHP Code
[
Download
]
for(countPt = 1; countPt < 4; countPt = countPt + 1) { float delta = steps; m = (yP[countPt] - yP[countPt - 1])/(xP[countPt] - xP[countPt - 1]); if(xP[countPt] > xP[countPt - 1]) { delta *= -1; } for(countX = xP[countPt]; countX > xP[countPt - 1]; countX += delta) { float innerDelta = steps; if(yP[countPt] >= yP[countPt - 1]) { innerDelta *= -1; } for(countY = yP[countPt]; countY < yP[countPt - 1]; countY = countY + innerDelta) { m2 = (countY - yP[countPt - 1])/(countX - xP[countPt - 1]); if(smoothstep((m - rel),(m + rel), m2) > 0 && smoothstep((m - rel),(m + rel), m2) < 1) { if(s >= (countX - steps2) && s <= (countX + steps2) && t >= (countY - steps2) && t <= (countY + steps2)) surfcolor = (1, 1, 1); } } } }//ends for
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.50 / 8
64 Votes
http://codebin.yi.org/930
page generated in 0.01 seconds