Add triangles intersect usage example - #802
Conversation
✅ Deploy Preview for splashkit ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Osaid2993
left a comment
There was a problem hiding this comment.
@ekam313, Please remove the comments that only repeat the code, such as:
- Define a fixed triangle
- Create a triangle that follows the mouse
- Check whether the triangles intersect
Comments should explain why, not restate the code. Please update this consistently across all four versions.
AAMIRAU
left a comment
There was a problem hiding this comment.
The example itself looks good and the intersection behaviour is clearly demonstrated. I noticed the previously requested cleanup of comments that only restate the code is still pending across the language versions. Once those comments are removed or updated, this should be good to go.
rachelpatrao
left a comment
There was a problem hiding this comment.
everything looks great and the example clearly demonstrates the intersection behaviour. Once the comments are cleaned up you might want look into registering this example in scripts/json-files/usage-example-references so that it can be properly referenced. Once thats done its all good to go!
Removed comments related to triangle definitions and intersection checks.
Removed comments about fixed and moving triangles for clarity.
Removed comments for clarity in triangle intersection example.
Removed comments about triangle definitions and intersection check.
|
i have removed the comments please have a look. thanks |
Description
This pull request adds a new SplashKit usage example for the
triangles_intersectfunction in the Geometry category.The example displays one fixed triangle and one triangle that follows the
mouse. The program continuously checks whether the two triangles intersect.
The moving triangle and the displayed message change depending on the boolean
result returned by
triangles_intersect.The example is implemented consistently in C++, C# top-level statements,
C# object-oriented format, and Python. A descriptive title and GIF are also
included.
No additional dependencies are required.
Type of change
How Has This Been Tested?
All four code versions were run locally. The following behaviour was verified:
The website was also built and previewed locally to confirm that the example
appears under the correct function and that the GIF and code files display
correctly.
Testing Checklist
Checklist
If involving code
Folders and Files Added/Modified
public/usage-examples/geometry/triangles_intersect-1-example.cpppublic/usage-examples/geometry/triangles_intersect-1-example-top-level.cspublic/usage-examples/geometry/triangles_intersect-1-example-oop.cspublic/usage-examples/geometry/triangles_intersect-1-example.pypublic/usage-examples/geometry/triangles_intersect-1-example.txtpublic/usage-examples/geometry/triangles_intersect-1-example.gifAdditional Notes
The GIF demonstrates both the intersecting and non-intersecting states by moving
the second triangle with the mouse.