As I stated in my last post, I will be performing peer-reviews for my 0.4 release. Today I looked at bezierTangent() coded by Dliu53. Here is a link to the lighthouse ticket, the processing reference, and the JAVA code I used to decide what the function is suppose to return. It took me a while to test the function because I couldn’t find any of Dliu53’s demos or test pages. When I compared the Java code with the JavaScript code I realized that it wasn’t the same. I decided to write my own demos, well just basically spitting out the values that were returned by the function. Here is a demo using Dliu53’s bezierTangent(). Here is a demo using my own (well I copy and pasted the Java code I linked to above) .Notice the output is not the same. Now you might be thinking how I figured out which one is correct? I copied the code from my demos into the Java 1.0.7 environment. I am including a screen shot of the output below.
The basis for my decision:
- the function returns the appropriate value.
- the function is written following the coding standards . Using 2 spaces instead of a tab, and leaving a space around brackets
After reviewing the code I gave bezierTangent() the status of review-needs-work because the output was wrong.
Pingback: BezierTangent()…A Second Look « Anna on Stuff (Processing.js/Open Source)