Skip to content
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

Implement RandIn operation #21

Open
Xkonti opened this issue Sep 15, 2023 · 0 comments
Open

Implement RandIn operation #21

Xkonti opened this issue Sep 15, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issues that qualify towards Hacktoberfest goals.
Milestone

Comments

@Xkonti
Copy link
Owner

Xkonti commented Sep 15, 2023

Generates a vector with random components within a specified range. The range is specified by vector/component and a zero vector.

// These are the same
V2F{12, 13}.RandIn() == V2F{12, 13}.RandBetween(V2F{0, 0})

rangeX, rangeY, rangeZ := 12, 34, 15
rangeVec := V3I{rangeX, rangeY, rangeZ}

random1 := rangeVec.RandIn() // Returns a new random vector
rangeVec.RandInInPlace() // Updates the existing vector with random values
@Xkonti Xkonti added enhancement New feature or request good first issue Good for newcomers labels Sep 15, 2023
@Xkonti Xkonti added this to the v1.0.0 milestone Sep 15, 2023
@Xkonti Xkonti changed the title Implement RandomIn operation Implement RandIn operation Sep 15, 2023
@Xkonti Xkonti added the hacktoberfest Issues that qualify towards Hacktoberfest goals. label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issues that qualify towards Hacktoberfest goals.
Projects
None yet
Development

No branches or pull requests

1 participant