Add triangles intersect usage example - #802
Open
ekam313 wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for splashkit ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Osaid2993
suggested changes
Aug 3, 2026
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
reviewed
Aug 7, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.