小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

(求兩直線交點(diǎn)坐標(biāo))錯(cuò)在哪了? .NET技術(shù) / VB.NET...

 古羅 2007-11-29
Public   Function   Interf(ByRef   Dxa   As   Double,   ByRef   Dya   As   Double,   ByRef   Dxb   As   Double,   ByRef   Dyb   As   Double)   As   Integer  
                  If   Dxa   =   0   And   Dxb   =   0   Then  
                          Return   1  
                  End   If  
                  If   Dya   =   0   And   Dyb   =   0   Then  
                          Return   1  
   
                  End   If  
                  If   Dxa   <>   0   And   Dxb   <>   0   Then  
                          If   Dya   /   Dxa   =   Dyb   /   Dxb   Then  
                                  Return   1  
                          End   If  
                  End   If  
                  If   Dxa   =   0   And   Dxb   <>   0   Then  
                          Return   2  
                  End   If  
                  If   Dxb   =   0   And   Dxa   <>   0   Then  
                          Return   3  
   
                  End   If  
                  Return   4  
          End   Function  
   
  -----------  
    X1   =   Val(TextBox1.Text)  
                  Y1   =   Val(TextBox2.Text)  
                  X2   =   Val(TextBox3.Text)  
                  Y2   =   Val(TextBox4.Text)  
                  X3   =   Val(TextBox5.Text)  
                  Y3   =   Val(TextBox6.Text)  
                  X4   =   Val(TextBox7.Text)  
                  Y4   =   Val(TextBox8.Text)  
   
                  Dx1   =   (X2   -   X1)  
                  Dy1   =   (Y2   -   Y1)  
                  Dx2   =   (X4   -   X3)  
                  Dy2   =   (Y4   -   Y3)  
                  sa2   =   Interf(Dx1,   Dy1,   Dx2,   Dy2)  
   
   
                  If   sa2   =   1   Then  
                          TextBox9.Text   =   "平行"   :   TextBox10.Text   =   "平行"   :   Exit   Sub  
                  Else  
                          Select   Case   sa2  
                                  Case   2  
                                          X5   =   X1   :   Y5   =   (Dy2   /   Dx2)   *   (X5   -   X3)   +   Y3  
                                  Case   3  
                                          X5   =   X3   :   Y5   =   (Dy1   /   Dy2)   *   (X5   -   X1)   +   Y1  
                                  Case   4  
                                          X5   =   (Y3   -   Y1   +   (Dy1   /   Dx1)   *   X1   -   (Dy2   /   Dx2)   *   X3)   /   (Dy1   /   Dx1   -   Dy2   /   Dx2)   :   Y5   =   (Dy1   /   Dx1)   *   (X5   -   X1)   +   Y1  
   
                          End   Select  
                  End   If  
   
                   
   
                  TextBox9.Text   =   X5  
                  TextBox10.Text   =   Y5

    本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多