public static DIEM Trong_tam(TAM_GIAC tg) { DIEM kq; kq.x = (tg.A.x + tg.B.x + tg.C.x) / 3; kq.y = (tg.A.y + tg.B.y + tg.C.y) / 3; return(kq); }
public static String Chuoi(TAM_GIAC tg) { String kq; kq = "A" + XL_DIEM.Chuoi(tg.A); kq = kq + "B" + XL_DIEM.Chuoi(tg.B); kq = kq + "C" + XL_DIEM.Chuoi(tg.C); return(kq); }
public static String Chuoi_tam_giac(TAM_GIAC tg) { String kq; kq = "A" + Chuoi_diem(tg.A); kq = kq + " B" + Chuoi_diem(tg.B); kq = kq + " C" + Chuoi_diem(tg.C); return(kq); }
public static Double Chu_vi(TAM_GIAC tg) { Double kq; kq = XL_DIEM.Khoang_cach(tg.A, tg.B); kq = kq + XL_DIEM.Khoang_cach(tg.B, tg.C); kq = kq + XL_DIEM.Khoang_cach(tg.C, tg.A); return(kq); }