-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Vector Generation Physics Usage Examples #286
base: usage-examples
Are you sure you want to change the base?
Add Vector Generation Physics Usage Examples #286
Conversation
✅ Deploy Preview for splashkit-usage-examples ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed the following functions
unit_vector
vector_from_angle
vector_from_line
vector_from_point_to_rect
vector_invert
vector_limit
vector_normal
vector_out_of_circle_from_circle
vector_out_of_circle_from_point
vector_out_of_rect_from_circle
vector_out_of_rect_from_point
vector_out_of_rect_from_rect
vector_point_to_point
vector_to
vector_to_point
- All required files are present.
- Title and explanation (.txt)
- C++ code
- C# code (top-level statements)
- C# code (Object-Oriented Programming)
- Python code
- Code correctly uses Splashkit functions.
- Code clearly demonstrates the function.
- All versions maintain the same structure and comments.
- C++ code ran correctly.
- C# top level code ran correctly.
- C# OOP code ran correctly.
- Python code ran correctly.
Feedback:
In these code files
vector_out_of_circle_from_circle-simple.cpp
vector_out_of_circle_from_point.cpp
vector_out_of_rect_from_circle.cpp
the line outer_circle.center = {150, 150};
produces an error for invalid syntax. C++ requires explicit construction of structs like point_2d.
Thanks for the thorough review and good spot. Changes made and checked. Working as intended! |
Description
This pull request adds simple usage examples for the following vector generation functions in SplashKit:
unit_vector
vector_from_angle
vector_from_line
vector_from_point_to_rect
vector_invert
vector_limit
vector_normal
vector_out_of_circle_from_circle
vector_out_of_circle_from_point
vector_out_of_rect_from_circle
vector_out_of_rect_from_point
vector_out_of_rect_from_rect
vector_point_to_point
vector_to
vector_to_point
The purpose of this update is to help users understand the functionality of these vector generation functions in SplashKit by providing detailed examples across supported languages (C++, C#, and Python).
Each example includes:
No resource zip files are required for these examples.
Type of change
How Has This Been Tested?
All functions were run and tested to ensure output was as expected.
Testing Checklist
npm run build
npm run preview
Checklist
If involving code
If modified config files
Additional Notes
Each example is designed to demonstrate only the basic functionality of vector generation functions in SplashKit. The resources provided will enable users to replicate, modify, and understand how to implement the functions and what the expected outputs might look like.