📄 triple.c
字号:
#include "mystdlib.h"#include "commonInter.h"#include "triple.h"struct triple{ poly x; poly y; poly z;};triple newTriple (poly x, poly y, poly z){ triple temp = checkedMalloc (sizeof (*temp)); temp->x = x; temp->y = y; temp->z = z; return temp;}poly tripleFirst (triple t){ return t->x;}poly tripleSecond (triple t){ return t->y;}poly tripleThird (triple t){ return t->z;}str tripleToString (triple t){ str sx = getVft (t->x)->toString (t->x); str sy = getVft (t->y)->toString (t->y); str sz = getVft (t->z)->toString (t->z); str s1 = strConcat (newStr ("("), sx); str s2 = strConcat (s1, newStr (", ")); str s3 = strConcat (s2, sy); str s4 = strConcat (s3, newStr (", ")); str s5 = strConcat (s4, sz); str s6 = strConcat (s5, newStr (")")); strFree (sx); strFree (sy); strFree (sz); strFree (s1); strFree (s2); strFree (s3); strFree (s4); strFree (s5); return s6;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -