上代码: using UnityEngine;
using System.Collections; public class Test : MonoBehaviour { private Vector3 startPosition; //鼠标按钮的坐标点 private float x; publi...
分类:
移动开发 时间:
2015-01-28 06:10:23
阅读次数:
208
英语不好, 见谅。 1 float myRound (float src, int idx) 2 { 3 //move idx numbers right of the point 4 //to the left 5 for (int i = idx; i--;) { 6 ...
分类:
其他好文 时间:
2015-01-27 21:35:16
阅读次数:
155
1、setTranslate(float ds,float dy):控制Matrix进行平移。2、setSkew(float kx,float ky,float px,float py):控制Matrix以px、py为轴心进行倾斜。kx、ky为X、Y方向上的倾斜距离。3、setSkew(float ...
分类:
其他好文 时间:
2015-01-26 22:39:38
阅读次数:
255
在Ubuntu下,比葫芦画瓢,写了一个程序,居然报错!!!! 1 #include 2 3 float i = 3; 4 int j = *(int *)(&i) ; 5 6 int main (int argc , char *argv[]) 7 { 8 printf( "i = %...
分类:
其他好文 时间:
2015-01-26 21:03:23
阅读次数:
171
1、number数字可以直接在python运算,使用圆括号分组In[1]:2+2
Out[1]:4
In[2]:50-5*6
Out[2]:20
In[3]:(50-5.0*6)/4
Out[3]:5.0
In[4]:8/5.0
Out[4]:1.6在进行除法/的时候,如果2个除数都是int型,则返回的值也为整型int:如果有1个除数为浮点型float,则结果值为浮点型float..
分类:
编程语言 时间:
2015-01-26 19:29:46
阅读次数:
224
//无法正常运行
#include
#include
using namespace std;
class book
{
public:
int num;
float price;
book *next;
};
book *head=NULL;
bool check(string str)//检查是否是数字
{
for(int i=0;i<str.length();i++)
{
if...
分类:
编程语言 时间:
2015-01-26 19:19:26
阅读次数:
133
1.strictfp, 即 strict float point (精确浮点)。 strictfp keyword可应用于类、接口或方法。使用 strictfp keyword声明一个方法时,该方法中全部的float和double表达式都严格遵守FP-strict的限制,符合IEEE-754规范。....
分类:
编程语言 时间:
2015-01-26 19:06:13
阅读次数:
130
在进行类转json字符串时,报错JsonException: Max allowed object depth reached while trying to export from type System.Single。
ok,实际上是类的属性中有json不能识别的数据类型,我这里就脑残的float。去除掉之后就ok了。
(备注:用的是LitJson)
那一般什么类型是允许的呢?
我在J...
分类:
Web程序 时间:
2015-01-26 17:19:17
阅读次数:
209
#include
using namespace std;
class book
{
public:
int num;
float price;
book *next;
};
book *head=NULL;
book *creat()
{
book *p1,*p2;
p1=new book;
head=p1;
p2=p1;
cout<<"请输入图书的编号,以0结束"<<endl;...
分类:
编程语言 时间:
2015-01-26 17:11:22
阅读次数:
200
得到当前的时间戳import time#得到float类型 1422258513.05now = time.time()#得到整数型时间戳 1422258513nowi = int(now)http://www.cnblogs.com/wanpython/archive/2010/08/...
分类:
编程语言 时间:
2015-01-26 16:25:56
阅读次数:
163