我想交换两个二维浮点数数组。
float[][] bluePath ={
{-.025f,-.303f},
{-.025f,.05f},
{-0.38f,-.215f}
}
float[][] greenPath ={
{-.4f,-.23f},
{-.55f,.03f},
{-0.58f,-.55f}
}
交换后,我要跟踪result:-
float[][] bluePath ={
{-.4f,-.23f},
{-.55f,.03f},
{-0.58f,-.55f}
}
float[][] greenPath ={
{-.025f,-.303f},
{-.025f,.05f},
{-0.38f,-.215f}
}
请帮我解决这个问题。
2条答案
按热度按时间zvokhttg1#
使用临时变量并逐字节复制。
sbdsn5lh2#
您可以使用以下代码: