-
Notifications
You must be signed in to change notification settings - Fork 2
Scratch
Hyomoto edited this page Oct 12, 2020
·
10 revisions
| Jump To | Go Back |
Arguments | Methods | Variables |
|---|
A simple garbage-collected pair of values.
var _pair = new Pair( "Hello", "World!" )
show_debug_message( _pair.a + _pair.b );| Name | Type | Purpose |
|---|---|---|
a |
any | The value of a |
b |
any | The value of b |
| Jump To | top |
equals | is |
|---|
Returns: N/A (undefined)
| Name | Type | Purpose |
|---|---|---|
pair |
Pair | The Pair to compare to this one |
This method can also be provided another Vec2 for purposes of comparison. This is a strict comparison of the internal values, testing a Pair against itself will return true, but does not test if the Vec2 structures are the same one.
Returns: N/A (undefined)
| Name | Type | Purpose |
|---|---|---|
a |
any | The value to compare a to |
b |
any | The value to compare b to |
This method is used to compare two values against this pair to see if they match. This is a strict comparison, thus it will only return true if both a and b match the provided arguments.
Returns: boolean (true or false)
| Name | Type | Purpose |
|---|---|---|
type |
struct id | The structure type to compare this against. |
Returns true if the provided type is Pair.
| Jump To | top |
|---|
- a - the a value
- b - the b value
Devon Mullane 2020