I have a record type
tLine = record
X, Y, Count : integer;
V : boolean;
end;
I have a
function fRotate(zLine: tLine; zAngle: double): tLine;
I want to pass zLine, but with its Y field reduced by 1. Is there a way to break a record down into its specific fields in a procedure or function? I tried
NewLine:=fRotate((zLine.X, zLine.Y-1, zLine.Count, zLine.V), zAngle);
which does not work. Or do I have to do as follows:
dec(zLine.Y);
NewLine:=fRotate(zLine, zAngle);
inc(zLine.Y);
TIA
TPoint
instead of the array. e.g.fRotate(fLine - Point(0, 1), fAngle)
– Iberia