看板 Flash 關於我們 聯絡資訊
if(this.x-this._x>1 or this.x-this._x<-1){ this._x += (this.x-this._x)/2; }else{ this._x += (this.x-this._x); } if(this.y-this._y>1 or this.y-this._y<-1){ this._y += (this.y-this._y)/2; }else{ this._y += (this.y-this._y); } 這是我程式碼 其中每次按下自動格式化 都會說自動格式化漸近線錯誤 並且指出this._x += (this.x-this._x)/2;這行 改成 this._x += (this.x-this._x)*0.5 this._x += this.x*0.5-this._x*0.5; this._x = (this.x-this._x)/2+this._x 都沒有用 請問何解? -- ◥ ◆◆ ◆◆ 兔鍋六連 ‵*′ ◢███◣ '!‵ _◢█__█◣ ‵*′| U ◤ ̄██ ′!‵ ◥█ ̄ ̄█◤ ◤@binshaunMKII ◥███◤ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.62.110.232
aquarianboy:AS2 = this._x AS3 = this.x 11/14 23:18
etrexetrex:我以為原po 是自己存東西到 x 裡 11/14 23:35
KawasumiMai:to一樓:我知道這樣命名頗不嚴謹 11/15 09:34
KawasumiMai:可是我試過改用this.x改成this.prex 一樣有錯 11/15 09:35
emily114005:CS4 BUG if(someThing < -1) 11/15 15:32
KawasumiMai:喔... 11/15 15:52