Talk:Xiaolin Wu's line algorithm: Difference between revisions

m
added a section header to the first talk topic so that the table of contents (TOC) is in the correct place.
(→‎REXX comment: FLOOR & IPART for positive (or zero) numbers. -- ~~~~)
m (added a section header to the first talk topic so that the table of contents (TOC) is in the correct place.)
 
(6 intermediate revisions by 3 users not shown)
Line 1:
== '''C#''' solution for '''Xiaolin Wu's line algorithm''' ? ==
Any guy can give me '''Xiaolin Wu's line algorithm'''s code in C#.
Than you.
Line 64 ⟶ 65:
::: Once you make all numbers non-negative, FLOOR and IPART are synonymous. It's only when using negative numbers that the issue (any difference) is raised. -- [[User:Gerard Schildberger|Gerard Schildberger]] 16:51, 4 June 2012 (UTC)
 
:::: Yes, but I made some of them negative for the algorithm (just translating them to positive when they were rendered). --[[User:Rdm|Rdm]] 17:02, 4 June 2012 (UTC)
::: Concerning another issue: FPART. When handling negative coödinates, I was wondering if FPART is doing what it's supposed to do, but I couldn't find a good definition of FPART (with regarding to negative numbers) --- but I'm still rooting around the 'net. For non-negative numbers, the simple definition of FPART (even if wrong), still gives the correct answer. FPART of 6.78 is +0.78. But what about -8.91 ? Is the fractional part +0.91 or -0.91 ? --- I'm still trying to locate a good definition for it --- I hope the definition isn't tied (or restricted to) any particular computer language. Perhaps someone could find a complete/good definition of FPART in their appropriate language reference documentation. -- [[User:Gerard Schildberger|Gerard Schildberger]] 16:46, 4 June 2012 (UTC)
 
Concerning another issue: '''FPART'''.
 
::: Concerning another issue: FPART. When handling negative coödinates, I was wondering if FPART is doing what it's supposed to do, but I couldn't find a good definition of FPART (with regarding to negative numbers) --- but I'm still rooting around the 'net. For non-negative numbers, the simple definition of FPART (even if wrong), still gives the correct answer. FPART of 6.78 is +0.78. But what about -8.91 ? Is the fractional part +0.91 or -0.91 ? --- I'm still trying to locate a good definition for it --- I hope the definition isn't tied (or restricted to) any particular computer language. Perhaps someone could find a complete/good definition of FPART in their appropriate language reference documentation. -- [[User:Gerard Schildberger|Gerard Schildberger]] 16:46, 4 June 2012 (UTC)
 
FPART of 6.78 is +0.78. But what about -8.91 ? Is the fractional part +0.91 or -0.91 ?
 
I'm still trying to locate a good definition for it --- I hope the definition isn't tied (or restricted to) any particular computer language.
 
Perhaps someone could find a complete/good definition of FPART in their appropriate language reference documentation. -- [[User:Gerard Schildberger|Gerard Schildberger]] 16:46, 4 June 2012 (UTC)
 
: The integer part and the fractional part should add together to yield your original number. --[[User:Rdm|Rdm]] 17:03, 4 June 2012 (UTC)
 
:: Tank qew. Makes sense, concise, succent. So, -0.91 it is. -- [[User:Gerard Schildberger|Gerard Schildberger]] 17:13, 4 June 2012 (UTC)
 
== Problem In Java Code ==
 
The Java code doesn't plot the line in all directions.