how can i accept only array of 2 doubles?
tried this but i get error
public SomeConstructor(double[2] pointA)
17 Replies
hmm tuple you say
like this?
ctor(Tuple<double, double> pointA)
?thats the old syntax
ctor((double, double) pointA)
a okay
doesnt the bcl have a point type?
and how do i then send it
initialize or sum
var x = new smth(...)
a okay thanksPoint Struct (System.Drawing)
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.
thanks but cant use it for now
doesnt take a double tho
id make a record struct
also 1 more question is there a way to like unpack a tuple?
something like
*tuple
in python or ...tuple
in type script
@Cyberrex ?Cyberrex#8052
REPL Result: Success
Result: double
Compile: 489.061ms | Execution: 44.580ms | React with ❌ to remove this embed.
yea
wdym
like pass a tuple to a method that expects seperate args?
no i dont think thats possible
okay
also you cant index tuples
o so how do i access values
either name the values, or
.Item1
, .Item2
etcYou can make your own