Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Class1.cs
Package: Project1.rar [view]
Upload User: tanejiagz
Upload Date: 2022-06-25
Package Size: 12k
Code Size: 1k
Category:
GPS develop
Development Platform:
C#
- using System;
- /// <summary>
- /// Class1 的摘要说明
- /// </summary>
- public class Class1
- {
- const double PI=3.1415926;
- public static void Main()
- {
- double[] arr1, arr2;
- arr1 = new double[2] {30.22787378/180*PI, 120.03308206/180*PI};
- arr2 = new double [2]{30.22786535/180*PI,120.03308391/180*PI};
- double j1 = arr1[0];
- double j2 = arr2[0];
- double w1 = arr1[1];
- double w2 = arr2[1];
- //double d=111.12*Math.Cos(1/(Math.Sin(w1)*Math.Sin(w2)+Math.Cos(w1)*Math.Cos(w2)*Math.Cos(j1-j2)));
- double d2 = 6371229 * Math.Acos((Math.Sin(w1) * Math.Sin(w2) + Math.Cos(w1) * Math.Cos(w2) * Math.Cos(j1 - j2)));
- //Console.WriteLine("两点间的距离是:{0}",d);
- Console.WriteLine("两点间的距离是:{0}",d2);
- }
- }