首页 > 其他 > 详细

c 结构体

时间:2019-06-28 00:15:20      阅读:88      评论:0      收藏:0      [点我收藏+]

 

#include <stdio.h>      /* puts, printf */
#include <time.h>       /* time_t, struct tm, time, localtime */
struct Position{
    double x;
    double y;
    double z;
};
struct Orientation{
    double w;
    double x;
    double y;
    double z;
};
struct pose{
    Position position;
    Orientation orientation;
};
//cur
//orientation: {w: 0.25, x: 0.0, y: 0.0, z: 0.97}
//position: {x: -4.95, y: -2.07, z: 0.0}

//origin
//-8.750273, -10.928155
int main ()
{
    pose cur;
    cur.position.x=-4.95;
    cur.position.y=-2.07;
    cur.position.z=0.0;
    cur.orientation.w=0.25;
    cur.orientation.x=0.0;
    cur.orientation.y=0.0;
    cur.orientation.z=0.97;
    
    pose origin;
    origin.position.x=-8.75;
    origin.position.y=-10.93;
    origin.position.z=0.0;
    origin.orientation.w=0.0;
    origin.orientation.x=0.0;
    origin.orientation.y=0.0;
    origin.orientation.z=0.0;
    
    return 0;
}

 

c 结构体

原文:https://www.cnblogs.com/sea-stream/p/11100363.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!