摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2020-07-15 23:28 y-y-y-y 阅读(431) 评论(0) 推荐(0) 编辑
摘要: sin 对边比斜边 cos 邻边比斜边 tan 对边比邻边 弧度乘以180除以PI返回角度 0.5235987755982988 * (180 / Math.PI) = 30°; 角度乘以PI除以180返回弧度 30*Math.PI/180 = 0.5235987755982988; Math.si 阅读全文
posted @ 2020-07-15 22:56 y-y-y-y 阅读(535) 评论(0) 推荐(0) 编辑
摘要: c代码: #include<emscripten/emscripten.h> #include<stdlib.h> typedef struct { unsigned char * str; int a; double c; }data; data d = {(unsigned char *)"我是 阅读全文
posted @ 2020-07-12 18:37 y-y-y-y 阅读(756) 评论(0) 推荐(0) 编辑
摘要: c代码 #include <stdio.h> #include <emscripten/emscripten.h> typedef struct { int32_t number; double d; uint8_t* s; }obj; obj g = {1245,25.123456,(uint8_ 阅读全文
posted @ 2020-07-11 22:39 y-y-y-y 阅读(711) 评论(0) 推荐(0) 编辑
摘要: emcc main.c -s WASM=1 -o index.js 将c代码编译为wasm并且输出胶水代码index.js -O1 代码优化 -O2 优化级别提高 -O3 最高优化级别减小代码体积 emcc main.c -s MODULARIZE=1 -s EXPORT_NAME="createM 阅读全文
posted @ 2020-07-11 16:07 y-y-y-y 阅读(779) 评论(0) 推荐(0) 编辑
摘要: url:https://www.opengps.cn/Data/IP/LocHiAcc.ashx type:POST data:{ ip:你的ip } 返回当前位置经纬度 偏差在100来米左右 搜狐获取ip脚本: http://pv.sohu.com/cityjson?ie=utf-8 阅读全文
posted @ 2020-07-09 10:09 y-y-y-y 阅读(1159) 评论(0) 推荐(0) 编辑
摘要: let pi = 3.1415926535897932384626; let x_pi = 3.14159265358979324 * 3000.0 / 180.0; let a = 6378245.0; let ee = 0.00669342162296594323; class LngLonUt 阅读全文
posted @ 2020-07-08 09:46 y-y-y-y 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 参照 https://tieba.baidu.com/p/3569073088?tpl=5&red_tag=1777318765 使用mingw工具链 #include <stdbool.h> #include <stdio.h> #include <SDL2/SDL.h> #include <SD 阅读全文
posted @ 2020-06-14 16:22 y-y-y-y 阅读(819) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2020-03-13 20:25 y-y-y-y 阅读(1104) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2020-01-30 16:40 y-y-y-y 阅读(336) 评论(0) 推荐(0) 编辑