亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? math_object.cpp

?? khtml在gtk上的移植版本
?? CPP
字號:
// -*- c-basic-offset: 2 -*-/* *  This file is part of the KDE libraries *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org) * *  This library is free software; you can redistribute it and/or *  modify it under the terms of the GNU Lesser General Public *  License as published by the Free Software Foundation; either *  version 2 of the License, or (at your option) any later version. * *  This library is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *  Lesser General Public License for more details. * *  You should have received a copy of the GNU Lesser General Public *  License along with this library; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * */#include <math.h>#include <stdlib.h>#include <stdio.h>#include <assert.h>#include "value.h"#include "object.h"#include "types.h"#include "interpreter.h"#include "operations.h"#include "math_object.h"#include "math_object.lut.h"#ifndef M_PI#define M_PI 3.14159265358979323846#endif  /*  M_PI  */using namespace KJS;// ------------------------------ MathObjectImp --------------------------------const ClassInfo MathObjectImp::info = { "Math", 0, &mathTable, 0 };/* Source for math_object.lut.h@begin mathTable 21  E             MathObjectImp::Euler    DontEnum|DontDelete|ReadOnly  LN2           MathObjectImp::Ln2      DontEnum|DontDelete|ReadOnly  LN10          MathObjectImp::Ln10     DontEnum|DontDelete|ReadOnly  LOG2E         MathObjectImp::Log2E    DontEnum|DontDelete|ReadOnly  LOG10E        MathObjectImp::Log10E   DontEnum|DontDelete|ReadOnly  PI            MathObjectImp::Pi       DontEnum|DontDelete|ReadOnly  SQRT1_2       MathObjectImp::Sqrt1_2  DontEnum|DontDelete|ReadOnly  SQRT2         MathObjectImp::Sqrt2    DontEnum|DontDelete|ReadOnly  abs           MathObjectImp::Abs      DontEnum|Function 1  acos          MathObjectImp::ACos     DontEnum|Function 1  asin          MathObjectImp::ASin     DontEnum|Function 1  atan          MathObjectImp::ATan     DontEnum|Function 1  atan2         MathObjectImp::ATan2    DontEnum|Function 2  ceil          MathObjectImp::Ceil     DontEnum|Function 1  cos           MathObjectImp::Cos      DontEnum|Function 1  exp           MathObjectImp::Exp      DontEnum|Function 1  floor         MathObjectImp::Floor    DontEnum|Function 1  log           MathObjectImp::Log      DontEnum|Function 1  max           MathObjectImp::Max      DontEnum|Function 2  min           MathObjectImp::Min      DontEnum|Function 2  pow           MathObjectImp::Pow      DontEnum|Function 2  random        MathObjectImp::Random   DontEnum|Function 0  round         MathObjectImp::Round    DontEnum|Function 1  sin           MathObjectImp::Sin      DontEnum|Function 1  sqrt          MathObjectImp::Sqrt     DontEnum|Function 1  tan           MathObjectImp::Tan      DontEnum|Function 1@end*/MathObjectImp::MathObjectImp(ExecState * /*exec*/,                             ObjectPrototypeImp *objProto)  : ObjectImp(objProto){}// ECMA 15.8Value MathObjectImp::get(ExecState *exec, const Identifier &propertyName) const{  return lookupGet<MathFuncImp, MathObjectImp, ObjectImp>( exec, propertyName, &mathTable, this );}Value MathObjectImp::getValueProperty(ExecState *, int token) const{  double d = -42; // ;)  switch (token) {  case Euler:    d = exp(1.0);    break;  case Ln2:    d = log(2.0);    break;  case Ln10:    d = log(10.0);    break;  case Log2E:    d = 1.0/log(2.0);    break;  case Log10E:    d = 1.0/log(10.0);    break;  case Pi:    d = M_PI;    break;  case Sqrt1_2:    d = sqrt(0.5);    break;  case Sqrt2:    d = sqrt(2.0);    break;  default:    fprintf( stderr, "Internal error in MathObjectImp: unhandled token %d\n", token );    break;  }  return Number(d);}// ------------------------------ MathObjectImp --------------------------------MathFuncImp::MathFuncImp(ExecState *exec, int i, int l)  : InternalFunctionImp(    static_cast<FunctionPrototypeImp*>(exec->lexicalInterpreter()->builtinFunctionPrototype().imp())    ), id(i){  Value protect(this);  putDirect(lengthPropertyName, l, DontDelete|ReadOnly|DontEnum);}bool MathFuncImp::implementsCall() const{  return true;}Value MathFuncImp::call(ExecState *exec, Object &/*thisObj*/, const List &args){  double arg = args[0].toNumber(exec);  double arg2 = args[1].toNumber(exec);  double result;  switch (id) {  case MathObjectImp::Abs:    result = ( arg < 0 || arg == -0) ? (-arg) : arg;    break;  case MathObjectImp::ACos:    result = ::acos(arg);    break;  case MathObjectImp::ASin:    result = ::asin(arg);    break;  case MathObjectImp::ATan:    result = ::atan(arg);    break;  case MathObjectImp::ATan2:    result = ::atan2(arg, arg2);    break;  case MathObjectImp::Ceil:    result = ::ceil(arg);    break;  case MathObjectImp::Cos:    result = ::cos(arg);    break;  case MathObjectImp::Exp:    result = ::exp(arg);    break;  case MathObjectImp::Floor:    result = ::floor(arg);    break;  case MathObjectImp::Log:    result = ::log(arg);    break;  case MathObjectImp::Max: {    unsigned int argsCount = args.size();    result = -Inf;    for ( unsigned int k = 0 ; k < argsCount ; ++k ) {      double val = args[k].toNumber(exec);      if ( isNaN( val ) )      {        result = NaN;        break;      }      if ( val > result )        result = val;    }    break;  }  case MathObjectImp::Min: {    unsigned int argsCount = args.size();    result = +Inf;    for ( unsigned int k = 0 ; k < argsCount ; ++k ) {      double val = args[k].toNumber(exec);      if ( isNaN( val ) )      {        result = NaN;        break;      }      if ( val < result )        result = val;    }    break;  }  case MathObjectImp::Pow:    // ECMA 15.8.2.1.13 (::pow takes care of most of the critera)    if (KJS::isNaN(arg2))      result = NaN;    else if (arg2 == 0)      result = 1;    else if (KJS::isNaN(arg) && arg2 != 0)      result = NaN;    else if (::fabs(arg) > 1 && KJS::isPosInf(arg2))      result = Inf;    else if (::fabs(arg) > 1 && KJS::isNegInf(arg2))      result = +0;    else if (::fabs(arg) == 1 && KJS::isPosInf(arg2))      result = NaN;    else if (::fabs(arg) == 1 && KJS::isNegInf(arg2))      result = NaN;    else if (::fabs(arg) < 1 && KJS::isPosInf(arg2))      result = +0;    else if (::fabs(arg) < 1 && KJS::isNegInf(arg2))      result = Inf;    else      result = ::pow(arg, arg2);    break;  case MathObjectImp::Random:    result = ::rand();    result = result / RAND_MAX;    break;  case MathObjectImp::Round:    if (isNaN(arg))      result = arg;    else if (isInf(arg) || isInf(-arg))      result = arg;    else if (arg == -0.5)      result = 0;    else      result = (double)(arg >= 0.0 ? int(arg + 0.5) : int(arg - 0.5));    break;  case MathObjectImp::Sin:    result = ::sin(arg);    break;  case MathObjectImp::Sqrt:    result = ::sqrt(arg);    break;  case MathObjectImp::Tan:    result = ::tan(arg);    break;  default:    result = 0.0;    assert(0);  }  return Number(result);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡一区二区中文字幕| 亚洲欧美一区二区在线观看| 午夜精品福利一区二区三区av| 91免费在线看| 亚洲精品视频在线看| 欧美吞精做爰啪啪高潮| 日本不卡一区二区| 亚洲精品一区二区三区精华液| 国产二区国产一区在线观看| 国产精品国产三级国产aⅴ入口 | 精品剧情v国产在线观看在线| 麻豆专区一区二区三区四区五区| www激情久久| 97精品电影院| 日韩av午夜在线观看| 久久精品一区二区三区四区| 91首页免费视频| 热久久国产精品| 国产日韩欧美精品电影三级在线 | 亚洲成人综合视频| 欧美成人精品福利| 成人精品国产福利| 日韩精品一级二级| 国产精品每日更新在线播放网址| 在线观看三级视频欧美| 韩国一区二区在线观看| 亚洲欧美成aⅴ人在线观看| 日韩亚洲欧美成人一区| caoporen国产精品视频| 日韩av一区二区三区| 国产精品全国免费观看高清| 欧美日韩一区二区三区在线看| 国内精品自线一区二区三区视频| 亚洲三级久久久| 欧美不卡在线视频| 91在线看国产| 国产麻豆午夜三级精品| 婷婷开心久久网| 国产精品成人在线观看| 精品国产亚洲在线| 欧美日韩一级片网站| 国产**成人网毛片九色| 奇米影视一区二区三区| 曰韩精品一区二区| 欧美国产激情一区二区三区蜜月 | 亚洲成人精品一区二区| 国产精品欧美久久久久一区二区| 欧美一级高清片在线观看| 99精品一区二区| 国产精品资源网站| 日韩极品在线观看| 亚洲伊人伊色伊影伊综合网| 国产视频一区不卡| 精品久久国产老人久久综合| 欧美在线免费观看视频| 成人av免费在线播放| 国内一区二区视频| 视频一区欧美精品| 亚洲电影欧美电影有声小说| 亚洲欧洲精品一区二区三区不卡| 欧美岛国在线观看| 91精品国产91久久综合桃花| 在线观看国产91| 日本道在线观看一区二区| 成人精品免费网站| 国产一区二区影院| 国产在线国偷精品产拍免费yy| 免费看精品久久片| 日产精品久久久久久久性色| 婷婷丁香久久五月婷婷| 婷婷六月综合亚洲| 丝袜脚交一区二区| 日韩综合小视频| 亚洲gay无套男同| 亚洲妇女屁股眼交7| 亚洲专区一二三| 亚洲高清在线精品| 亚洲大片精品永久免费| 日韩一区欧美二区| 日本不卡1234视频| 狠狠色丁香久久婷婷综合_中| 美女视频黄 久久| 激情综合色丁香一区二区| 韩国成人精品a∨在线观看| 国产精品主播直播| av色综合久久天堂av综合| 97se狠狠狠综合亚洲狠狠| 99精品视频一区| 欧美性xxxxxx少妇| 91麻豆精品91久久久久同性| 日韩精品资源二区在线| 久久久精品免费免费| 国产精品免费久久| 一区二区成人在线| 日本欧美肥老太交大片| 国产一区二区不卡在线| 成人免费高清视频在线观看| 99re这里只有精品视频首页| 欧美影院一区二区| 欧美电影免费观看高清完整版| 国产亚洲一二三区| 一区二区不卡在线播放| 蜜臀久久久久久久| 国产不卡视频在线播放| 91视频免费播放| 91精品国产综合久久香蕉麻豆| 久久夜色精品国产噜噜av | 自拍偷拍国产亚洲| 图片区小说区国产精品视频| 国内精品第一页| 91免费观看在线| 日韩视频免费直播| 久久久久久久综合色一本| 中文字幕一区二区三区四区不卡 | 91麻豆精品国产91久久久使用方法 | 3atv在线一区二区三区| 日韩精品影音先锋| 亚洲色图欧洲色图婷婷| 美女诱惑一区二区| 91丨九色porny丨蝌蚪| 欧美精品色一区二区三区| 久久久一区二区三区| 亚洲资源在线观看| 国产成人免费视频网站高清观看视频| 色欧美88888久久久久久影院| 91精品国产欧美一区二区| 国产精品第一页第二页第三页| 免费人成网站在线观看欧美高清| 国产不卡免费视频| 91精品国产黑色紧身裤美女| 日韩美女久久久| 国产伦理精品不卡| 欧美高清视频在线高清观看mv色露露十八| 国产色91在线| 免费成人在线播放| 欧美色综合久久| 国产精品日产欧美久久久久| 人人超碰91尤物精品国产| 欧美亚洲丝袜传媒另类| 亚洲欧洲av一区二区三区久久| 蜜臀av性久久久久av蜜臀妖精| 91一区二区在线| 国产欧美日韩亚州综合| 另类的小说在线视频另类成人小视频在线| 成人av电影在线网| 久久久精品国产免费观看同学| 日本伊人色综合网| 在线电影欧美成精品| 一区二区三区四区在线播放| 成人性生交大片免费看中文网站| 91精品国产福利| 首页亚洲欧美制服丝腿| 在线免费观看日本欧美| 亚洲乱码国产乱码精品精98午夜 | 日韩丝袜情趣美女图片| 午夜欧美电影在线观看| 色婷婷久久久综合中文字幕| 亚洲国产精品精华液2区45| 国产成人在线观看| 日韩免费视频一区二区| 另类小说欧美激情| 精品国产乱码久久久久久牛牛 | 成人综合在线观看| 中文字幕精品一区二区精品绿巨人| 国产一区二区久久| 久久综合色婷婷| 国产精品一区二区91| 久久精品一区八戒影视| 91啪亚洲精品| 亚洲激情男女视频| 91成人在线免费观看| 一区二区三区资源| 欧美伊人久久久久久久久影院| 亚洲国产视频直播| 欧美精品在线一区二区三区| 日产精品久久久久久久性色| 日韩欧美不卡在线观看视频| 麻豆精品视频在线观看视频| 精品国产91久久久久久久妲己| 国产在线精品一区二区不卡了| 国产视频一区在线播放| 97久久人人超碰| 亚洲国产精品久久不卡毛片| 欧美老女人第四色| 看电视剧不卡顿的网站| 久久久久久久久免费| 成人污污视频在线观看| 亚洲综合激情网| 欧美一级免费大片| 国产一区二区在线影院| 1024成人网| 欧美精品欧美精品系列| 国产一区二区电影| 亚洲另类中文字| 欧美一区二区啪啪| 国v精品久久久网| 亚洲成av人综合在线观看| 久久新电视剧免费观看| 91丨国产丨九色丨pron| 七七婷婷婷婷精品国产|