Click here to Skip to main content
15,889,216 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Line through X Pin
crash89314-May-07 7:40
crash89314-May-07 7:40 
GeneralRe: Line through X Pin
crash89314-May-07 7:42
crash89314-May-07 7:42 
GeneralRe: Line through X Pin
crash89314-May-07 12:54
crash89314-May-07 12:54 
GeneralRe: Line through X Pin
Luc Pattyn14-May-07 13:02
sitebuilderLuc Pattyn14-May-07 13:02 
GeneralRe: Line through X Pin
crash89314-May-07 13:04
crash89314-May-07 13:04 
GeneralRe: Line through X Pin
Luc Pattyn14-May-07 13:30
sitebuilderLuc Pattyn14-May-07 13:30 
GeneralRe: Line through X Pin
crash89314-May-07 17:00
crash89314-May-07 17:00 
GeneralRe: Line through X Pin
Luc Pattyn14-May-07 20:23
sitebuilderLuc Pattyn14-May-07 20:23 
Hi,

my original post was pseudo-code (this is the math forum).
I assumed you would use real numbers for everything.
using ints for coordinates is OK, but the dist parameter must be a float,
so I suggest you do something like
float dist=random.Next(0,1000)/1000.0;
which gets a real number between 0.0 and 1.0

Smile | :)

Luc Pattyn

[My Articles]

GeneralRe: Line through X Pin
crash89315-May-07 6:00
crash89315-May-07 6:00 
GeneralRe: Line through X Pin
Luc Pattyn15-May-07 6:59
sitebuilderLuc Pattyn15-May-07 6:59 
GeneralRe: Line through X Pin
crash89315-May-07 7:24
crash89315-May-07 7:24 
Generalnew attempt Pin
crash89315-May-07 12:01
crash89315-May-07 12:01 
GeneralRe: new attempt2 Pin
crash89315-May-07 12:42
crash89315-May-07 12:42 
AnswerRe: Line through X Pin
Michael Sadlon22-May-07 12:01
Michael Sadlon22-May-07 12:01 
GeneralRe: Line through X Pin
crash89322-May-07 16:48
crash89322-May-07 16:48 
GeneralRe: Line through X Pin
crash89322-May-07 16:51
crash89322-May-07 16:51 
GeneralRe: Line through X Pin
cp987622-May-07 17:37
cp987622-May-07 17:37 
GeneralRe: Line through X Pin
crash89322-May-07 19:57
crash89322-May-07 19:57 
GeneralRe: Line through X Pin
cp987622-May-07 20:15
cp987622-May-07 20:15 
GeneralRe: Line through X Pin
crash89329-May-07 15:33
crash89329-May-07 15:33 
Question[Message Deleted] Pin
#12310-May-07 20:05
#12310-May-07 20:05 
JokeRe: Integer Geometry Pin
CPallini11-May-07 4:18
mveCPallini11-May-07 4:18 
GeneralRe: Integer Geometry Pin
CPallini11-May-07 9:40
mveCPallini11-May-07 9:40 
GeneralRe: Integer Geometry Pin
CPallini31-May-07 20:31
mveCPallini31-May-07 20:31 
GeneralRe: Integer Geometry Pin
CPallini31-May-07 20:57
mveCPallini31-May-07 20:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.