1 page.title=RenderScript Mathematical Constants and Functions 2 3 @jd:body 4 5 <div class='renderscript'> 6 <h2>Overview</h2> 7 <p> The mathematical functions below can be applied to scalars and vectors. When applied 8 to vectors, the returned value is a vector of the function applied to each entry of the input. 9 </p> 10 11 <p> For example:<code><br/> 12 float3 a, b;<br/> 13 // The following call sets<br/> 14 // a.x to sin(b.x),<br/> 15 // a.y to sin(b.y), and<br/> 16 // a.z to sin(b.z).<br/> 17 a = sin(b);<br/> 18 </code> 19 </p> 20 21 <p> See <a href='rs_vector_math.html'>Vector Math Functions</a> for functions like <a href='rs_vector_math.html#android_rs:distance'>distance</a>() and <a href='rs_vector_math.html#android_rs:length'>length</a>() that interpret 22 instead the input as a single vector in n-dimensional space. 23 </p> 24 25 <p> The precision of the mathematical operations on 32 bit floats is affected by the pragmas 26 rs_fp_relaxed and rs_fp_full. Under rs_fp_relaxed, subnormal values may be flushed to zero and 27 rounding may be done towards zero. In comparison, rs_fp_full requires correct handling of 28 subnormal values, i.e. smaller than 1.17549435e-38f. rs_fp_rull also requires round to nearest 29 with ties to even. 30 </p> 31 32 <p> Different precision/speed tradeoffs can be achieved by using variants of the common math 33 functions. Functions with a name starting with<ul> 34 <li>native_: May have custom hardware implementations with weaker precision. Additionally, 35 subnormal values may be flushed to zero, rounding towards zero may be used, and NaN and 36 infinity input may not be handled correctly.</li> 37 <li>half_: May perform internal computations using 16 bit floats. Additionally, subnormal 38 values may be flushed to zero, and rounding towards zero may be used.</li> 39 </ul> 40 </p> 41 <h2>Summary</h2> 42 <table class='jd-sumtable'><tbody> 43 <tr><th colspan='2'>Constants</th></tr> 44 <tr class='alt-color api apilevel-1'> 45 <td class='jd-linkcol'> 46 <a href='rs_math.html#android_rs:M_1_PI'>M_1_PI</a> 47 </td> 48 <td class='jd-descrcol' width='100%'> 49 1 / pi, as a 32 bit float 50 </td> 51 </tr> 52 <tr class='alt-color api apilevel-1'> 53 <td class='jd-linkcol'> 54 <a href='rs_math.html#android_rs:M_2_PI'>M_2_PI</a> 55 </td> 56 <td class='jd-descrcol' width='100%'> 57 2 / pi, as a 32 bit float 58 </td> 59 </tr> 60 <tr class='alt-color api apilevel-1'> 61 <td class='jd-linkcol'> 62 <a href='rs_math.html#android_rs:M_2_SQRTPI'>M_2_SQRTPI</a> 63 </td> 64 <td class='jd-descrcol' width='100%'> 65 2 / sqrt(pi), as a 32 bit float 66 </td> 67 </tr> 68 <tr class='alt-color api apilevel-1'> 69 <td class='jd-linkcol'> 70 <a href='rs_math.html#android_rs:M_E'>M_E</a> 71 </td> 72 <td class='jd-descrcol' width='100%'> 73 e, as a 32 bit float 74 </td> 75 </tr> 76 <tr class='alt-color api apilevel-1'> 77 <td class='jd-linkcol'> 78 <a href='rs_math.html#android_rs:M_LN10'>M_LN10</a> 79 </td> 80 <td class='jd-descrcol' width='100%'> 81 log_e(10), as a 32 bit float 82 </td> 83 </tr> 84 <tr class='alt-color api apilevel-1'> 85 <td class='jd-linkcol'> 86 <a href='rs_math.html#android_rs:M_LN2'>M_LN2</a> 87 </td> 88 <td class='jd-descrcol' width='100%'> 89 log_e(2), as a 32 bit float 90 </td> 91 </tr> 92 <tr class='alt-color api apilevel-1'> 93 <td class='jd-linkcol'> 94 <a href='rs_math.html#android_rs:M_LOG10E'>M_LOG10E</a> 95 </td> 96 <td class='jd-descrcol' width='100%'> 97 log_10(e), as a 32 bit float 98 </td> 99 </tr> 100 <tr class='alt-color api apilevel-1'> 101 <td class='jd-linkcol'> 102 <a href='rs_math.html#android_rs:M_LOG2E'>M_LOG2E</a> 103 </td> 104 <td class='jd-descrcol' width='100%'> 105 log_2(e), as a 32 bit float 106 </td> 107 </tr> 108 <tr class='alt-color api apilevel-1'> 109 <td class='jd-linkcol'> 110 <a href='rs_math.html#android_rs:M_PI'>M_PI</a> 111 </td> 112 <td class='jd-descrcol' width='100%'> 113 pi, as a 32 bit float 114 </td> 115 </tr> 116 <tr class='alt-color api apilevel-1'> 117 <td class='jd-linkcol'> 118 <a href='rs_math.html#android_rs:M_PI_2'>M_PI_2</a> 119 </td> 120 <td class='jd-descrcol' width='100%'> 121 pi / 2, as a 32 bit float 122 </td> 123 </tr> 124 <tr class='alt-color api apilevel-1'> 125 <td class='jd-linkcol'> 126 <a href='rs_math.html#android_rs:M_PI_4'>M_PI_4</a> 127 </td> 128 <td class='jd-descrcol' width='100%'> 129 pi / 4, as a 32 bit float 130 </td> 131 </tr> 132 <tr class='alt-color api apilevel-1'> 133 <td class='jd-linkcol'> 134 <a href='rs_math.html#android_rs:M_SQRT1_2'>M_SQRT1_2</a> 135 </td> 136 <td class='jd-descrcol' width='100%'> 137 1 / sqrt(2), as a 32 bit float 138 </td> 139 </tr> 140 <tr class='alt-color api apilevel-1'> 141 <td class='jd-linkcol'> 142 <a href='rs_math.html#android_rs:M_SQRT2'>M_SQRT2</a> 143 </td> 144 <td class='jd-descrcol' width='100%'> 145 sqrt(2), as a 32 bit float 146 </td> 147 </tr> 148 </tbody></table> 149 <table class='jd-sumtable'><tbody> 150 <tr><th colspan='2'>Functions</th></tr> 151 <tr class='alt-color api apilevel-1'> 152 <td class='jd-linkcol'> 153 <a href='rs_math.html#android_rs:abs'>abs</a> 154 </td> 155 <td class='jd-descrcol' width='100%'> 156 Absolute value of an integer 157 </td> 158 </tr> 159 <tr class='alt-color api apilevel-1'> 160 <td class='jd-linkcol'> 161 <a href='rs_math.html#android_rs:acos'>acos</a> 162 </td> 163 <td class='jd-descrcol' width='100%'> 164 Inverse cosine 165 </td> 166 </tr> 167 <tr class='alt-color api apilevel-1'> 168 <td class='jd-linkcol'> 169 <a href='rs_math.html#android_rs:acosh'>acosh</a> 170 </td> 171 <td class='jd-descrcol' width='100%'> 172 Inverse hyperbolic cosine 173 </td> 174 </tr> 175 <tr class='alt-color api apilevel-1'> 176 <td class='jd-linkcol'> 177 <a href='rs_math.html#android_rs:acospi'>acospi</a> 178 </td> 179 <td class='jd-descrcol' width='100%'> 180 Inverse cosine divided by pi 181 </td> 182 </tr> 183 <tr class='alt-color api apilevel-1'> 184 <td class='jd-linkcol'> 185 <a href='rs_math.html#android_rs:asin'>asin</a> 186 </td> 187 <td class='jd-descrcol' width='100%'> 188 Inverse sine 189 </td> 190 </tr> 191 <tr class='alt-color api apilevel-1'> 192 <td class='jd-linkcol'> 193 <a href='rs_math.html#android_rs:asinh'>asinh</a> 194 </td> 195 <td class='jd-descrcol' width='100%'> 196 Inverse hyperbolic sine 197 </td> 198 </tr> 199 <tr class='alt-color api apilevel-1'> 200 <td class='jd-linkcol'> 201 <a href='rs_math.html#android_rs:asinpi'>asinpi</a> 202 </td> 203 <td class='jd-descrcol' width='100%'> 204 Inverse sine divided by pi 205 </td> 206 </tr> 207 <tr class='alt-color api apilevel-1'> 208 <td class='jd-linkcol'> 209 <a href='rs_math.html#android_rs:atan'>atan</a> 210 </td> 211 <td class='jd-descrcol' width='100%'> 212 Inverse tangent 213 </td> 214 </tr> 215 <tr class='alt-color api apilevel-1'> 216 <td class='jd-linkcol'> 217 <a href='rs_math.html#android_rs:atan2'>atan2</a> 218 </td> 219 <td class='jd-descrcol' width='100%'> 220 Inverse tangent of a ratio 221 </td> 222 </tr> 223 <tr class='alt-color api apilevel-1'> 224 <td class='jd-linkcol'> 225 <a href='rs_math.html#android_rs:atan2pi'>atan2pi</a> 226 </td> 227 <td class='jd-descrcol' width='100%'> 228 Inverse tangent of a ratio, divided by pi 229 </td> 230 </tr> 231 <tr class='alt-color api apilevel-1'> 232 <td class='jd-linkcol'> 233 <a href='rs_math.html#android_rs:atanh'>atanh</a> 234 </td> 235 <td class='jd-descrcol' width='100%'> 236 Inverse hyperbolic tangent 237 </td> 238 </tr> 239 <tr class='alt-color api apilevel-1'> 240 <td class='jd-linkcol'> 241 <a href='rs_math.html#android_rs:atanpi'>atanpi</a> 242 </td> 243 <td class='jd-descrcol' width='100%'> 244 Inverse tangent divided by pi 245 </td> 246 </tr> 247 <tr class='alt-color api apilevel-1'> 248 <td class='jd-linkcol'> 249 <a href='rs_math.html#android_rs:cbrt'>cbrt</a> 250 </td> 251 <td class='jd-descrcol' width='100%'> 252 Cube root 253 </td> 254 </tr> 255 <tr class='alt-color api apilevel-1'> 256 <td class='jd-linkcol'> 257 <a href='rs_math.html#android_rs:ceil'>ceil</a> 258 </td> 259 <td class='jd-descrcol' width='100%'> 260 Smallest integer not less than a value 261 </td> 262 </tr> 263 <tr class='alt-color api apilevel-1'> 264 <td class='jd-linkcol'> 265 <a href='rs_math.html#android_rs:clamp'>clamp</a> 266 </td> 267 <td class='jd-descrcol' width='100%'> 268 Restrain a value to a range 269 </td> 270 </tr> 271 <tr class='alt-color api apilevel-1'> 272 <td class='jd-linkcol'> 273 <a href='rs_math.html#android_rs:clz'>clz</a> 274 </td> 275 <td class='jd-descrcol' width='100%'> 276 Number of leading 0 bits 277 </td> 278 </tr> 279 <tr class='alt-color api apilevel-1'> 280 <td class='jd-linkcol'> 281 <a href='rs_math.html#android_rs:copysign'>copysign</a> 282 </td> 283 <td class='jd-descrcol' width='100%'> 284 Copies the sign of a number to another 285 </td> 286 </tr> 287 <tr class='alt-color api apilevel-1'> 288 <td class='jd-linkcol'> 289 <a href='rs_math.html#android_rs:cos'>cos</a> 290 </td> 291 <td class='jd-descrcol' width='100%'> 292 Cosine 293 </td> 294 </tr> 295 <tr class='alt-color api apilevel-1'> 296 <td class='jd-linkcol'> 297 <a href='rs_math.html#android_rs:cosh'>cosh</a> 298 </td> 299 <td class='jd-descrcol' width='100%'> 300 Hypebolic cosine 301 </td> 302 </tr> 303 <tr class='alt-color api apilevel-1'> 304 <td class='jd-linkcol'> 305 <a href='rs_math.html#android_rs:cospi'>cospi</a> 306 </td> 307 <td class='jd-descrcol' width='100%'> 308 Cosine of a number multiplied by pi 309 </td> 310 </tr> 311 <tr class='alt-color api apilevel-1'> 312 <td class='jd-linkcol'> 313 <a href='rs_math.html#android_rs:degrees'>degrees</a> 314 </td> 315 <td class='jd-descrcol' width='100%'> 316 Converts radians into degrees 317 </td> 318 </tr> 319 <tr class='alt-color api apilevel-1'> 320 <td class='jd-linkcol'> 321 <a href='rs_math.html#android_rs:erf'>erf</a> 322 </td> 323 <td class='jd-descrcol' width='100%'> 324 Mathematical error function 325 </td> 326 </tr> 327 <tr class='alt-color api apilevel-1'> 328 <td class='jd-linkcol'> 329 <a href='rs_math.html#android_rs:erfc'>erfc</a> 330 </td> 331 <td class='jd-descrcol' width='100%'> 332 Mathematical complementary error function 333 </td> 334 </tr> 335 <tr class='alt-color api apilevel-1'> 336 <td class='jd-linkcol'> 337 <a href='rs_math.html#android_rs:exp'>exp</a> 338 </td> 339 <td class='jd-descrcol' width='100%'> 340 e raised to a number 341 </td> 342 </tr> 343 <tr class='alt-color api apilevel-1'> 344 <td class='jd-linkcol'> 345 <a href='rs_math.html#android_rs:exp10'>exp10</a> 346 </td> 347 <td class='jd-descrcol' width='100%'> 348 10 raised to a number 349 </td> 350 </tr> 351 <tr class='alt-color api apilevel-1'> 352 <td class='jd-linkcol'> 353 <a href='rs_math.html#android_rs:exp2'>exp2</a> 354 </td> 355 <td class='jd-descrcol' width='100%'> 356 2 raised to a number 357 </td> 358 </tr> 359 <tr class='alt-color api apilevel-1'> 360 <td class='jd-linkcol'> 361 <a href='rs_math.html#android_rs:expm1'>expm1</a> 362 </td> 363 <td class='jd-descrcol' width='100%'> 364 e raised to a number minus one 365 </td> 366 </tr> 367 <tr class='alt-color api apilevel-1'> 368 <td class='jd-linkcol'> 369 <a href='rs_math.html#android_rs:fabs'>fabs</a> 370 </td> 371 <td class='jd-descrcol' width='100%'> 372 Absolute value of a float 373 </td> 374 </tr> 375 <tr class='alt-color api apilevel-1'> 376 <td class='jd-linkcol'> 377 <a href='rs_math.html#android_rs:fdim'>fdim</a> 378 </td> 379 <td class='jd-descrcol' width='100%'> 380 Positive difference between two values 381 </td> 382 </tr> 383 <tr class='alt-color api apilevel-1'> 384 <td class='jd-linkcol'> 385 <a href='rs_math.html#android_rs:floor'>floor</a> 386 </td> 387 <td class='jd-descrcol' width='100%'> 388 Smallest integer not greater than a value 389 </td> 390 </tr> 391 <tr class='alt-color api apilevel-1'> 392 <td class='jd-linkcol'> 393 <a href='rs_math.html#android_rs:fma'>fma</a> 394 </td> 395 <td class='jd-descrcol' width='100%'> 396 Multiply and add 397 </td> 398 </tr> 399 <tr class='alt-color api apilevel-1'> 400 <td class='jd-linkcol'> 401 <a href='rs_math.html#android_rs:fmax'>fmax</a> 402 </td> 403 <td class='jd-descrcol' width='100%'> 404 Maximum of two floats 405 </td> 406 </tr> 407 <tr class='alt-color api apilevel-1'> 408 <td class='jd-linkcol'> 409 <a href='rs_math.html#android_rs:fmin'>fmin</a> 410 </td> 411 <td class='jd-descrcol' width='100%'> 412 Minimum of two floats 413 </td> 414 </tr> 415 <tr class='alt-color api apilevel-1'> 416 <td class='jd-linkcol'> 417 <a href='rs_math.html#android_rs:fmod'>fmod</a> 418 </td> 419 <td class='jd-descrcol' width='100%'> 420 Modulo 421 </td> 422 </tr> 423 <tr class='alt-color api apilevel-1'> 424 <td class='jd-linkcol'> 425 <a href='rs_math.html#android_rs:fract'>fract</a> 426 </td> 427 <td class='jd-descrcol' width='100%'> 428 Positive fractional part 429 </td> 430 </tr> 431 <tr class='alt-color api apilevel-1'> 432 <td class='jd-linkcol'> 433 <a href='rs_math.html#android_rs:frexp'>frexp</a> 434 </td> 435 <td class='jd-descrcol' width='100%'> 436 Binary mantissa and exponent 437 </td> 438 </tr> 439 <tr class='alt-color api apilevel-1'> 440 <td class='jd-linkcol'> 441 <a href='rs_math.html#android_rs:half_recip'>half_recip</a> 442 </td> 443 <td class='jd-descrcol' width='100%'> 444 Reciprocal computed to 16 bit precision 445 </td> 446 </tr> 447 <tr class='alt-color api apilevel-1'> 448 <td class='jd-linkcol'> 449 <a href='rs_math.html#android_rs:half_rsqrt'>half_rsqrt</a> 450 </td> 451 <td class='jd-descrcol' width='100%'> 452 Reciprocal of a square root computed to 16 bit precision 453 </td> 454 </tr> 455 <tr class='alt-color api apilevel-1'> 456 <td class='jd-linkcol'> 457 <a href='rs_math.html#android_rs:half_sqrt'>half_sqrt</a> 458 </td> 459 <td class='jd-descrcol' width='100%'> 460 Square root computed to 16 bit precision 461 </td> 462 </tr> 463 <tr class='alt-color api apilevel-1'> 464 <td class='jd-linkcol'> 465 <a href='rs_math.html#android_rs:hypot'>hypot</a> 466 </td> 467 <td class='jd-descrcol' width='100%'> 468 Hypotenuse 469 </td> 470 </tr> 471 <tr class='alt-color api apilevel-1'> 472 <td class='jd-linkcol'> 473 <a href='rs_math.html#android_rs:ilogb'>ilogb</a> 474 </td> 475 <td class='jd-descrcol' width='100%'> 476 Base two exponent 477 </td> 478 </tr> 479 <tr class='alt-color api apilevel-1'> 480 <td class='jd-linkcol'> 481 <a href='rs_math.html#android_rs:ldexp'>ldexp</a> 482 </td> 483 <td class='jd-descrcol' width='100%'> 484 Creates a floating point from mantissa and exponent 485 </td> 486 </tr> 487 <tr class='alt-color api apilevel-1'> 488 <td class='jd-linkcol'> 489 <a href='rs_math.html#android_rs:lgamma'>lgamma</a> 490 </td> 491 <td class='jd-descrcol' width='100%'> 492 Natural logarithm of the gamma function 493 </td> 494 </tr> 495 <tr class='alt-color api apilevel-1'> 496 <td class='jd-linkcol'> 497 <a href='rs_math.html#android_rs:log'>log</a> 498 </td> 499 <td class='jd-descrcol' width='100%'> 500 Natural logarithm 501 </td> 502 </tr> 503 <tr class='alt-color api apilevel-1'> 504 <td class='jd-linkcol'> 505 <a href='rs_math.html#android_rs:log10'>log10</a> 506 </td> 507 <td class='jd-descrcol' width='100%'> 508 Base 10 logarithm 509 </td> 510 </tr> 511 <tr class='alt-color api apilevel-1'> 512 <td class='jd-linkcol'> 513 <a href='rs_math.html#android_rs:log1p'>log1p</a> 514 </td> 515 <td class='jd-descrcol' width='100%'> 516 Natural logarithm of a value plus 1 517 </td> 518 </tr> 519 <tr class='alt-color api apilevel-1'> 520 <td class='jd-linkcol'> 521 <a href='rs_math.html#android_rs:log2'>log2</a> 522 </td> 523 <td class='jd-descrcol' width='100%'> 524 Base 2 logarithm 525 </td> 526 </tr> 527 <tr class='alt-color api apilevel-1'> 528 <td class='jd-linkcol'> 529 <a href='rs_math.html#android_rs:logb'>logb</a> 530 </td> 531 <td class='jd-descrcol' width='100%'> 532 Base two exponent 533 </td> 534 </tr> 535 <tr class='alt-color api apilevel-1'> 536 <td class='jd-linkcol'> 537 <a href='rs_math.html#android_rs:mad'>mad</a> 538 </td> 539 <td class='jd-descrcol' width='100%'> 540 Multiply and add 541 </td> 542 </tr> 543 <tr class='alt-color api apilevel-1'> 544 <td class='jd-linkcol'> 545 <a href='rs_math.html#android_rs:max'>max</a> 546 </td> 547 <td class='jd-descrcol' width='100%'> 548 Maximum 549 </td> 550 </tr> 551 <tr class='alt-color api apilevel-1'> 552 <td class='jd-linkcol'> 553 <a href='rs_math.html#android_rs:min'>min</a> 554 </td> 555 <td class='jd-descrcol' width='100%'> 556 Minimum 557 </td> 558 </tr> 559 <tr class='alt-color api apilevel-1'> 560 <td class='jd-linkcol'> 561 <a href='rs_math.html#android_rs:mix'>mix</a> 562 </td> 563 <td class='jd-descrcol' width='100%'> 564 Mixes two values 565 </td> 566 </tr> 567 <tr class='alt-color api apilevel-1'> 568 <td class='jd-linkcol'> 569 <a href='rs_math.html#android_rs:modf'>modf</a> 570 </td> 571 <td class='jd-descrcol' width='100%'> 572 Integral and fractional components 573 </td> 574 </tr> 575 <tr class='alt-color api apilevel-1'> 576 <td class='jd-linkcol'> 577 <a href='rs_math.html#android_rs:nan'>nan</a> 578 </td> 579 <td class='jd-descrcol' width='100%'> 580 Not a Number 581 </td> 582 </tr> 583 <tr class='alt-color api apilevel-1'> 584 <td class='jd-linkcol'> 585 <a href='rs_math.html#android_rs:native_acos'>native_acos</a> 586 </td> 587 <td class='jd-descrcol' width='100%'> 588 Approximate inverse cosine 589 </td> 590 </tr> 591 <tr class='alt-color api apilevel-1'> 592 <td class='jd-linkcol'> 593 <a href='rs_math.html#android_rs:native_acosh'>native_acosh</a> 594 </td> 595 <td class='jd-descrcol' width='100%'> 596 Approximate inverse hyperbolic cosine 597 </td> 598 </tr> 599 <tr class='alt-color api apilevel-1'> 600 <td class='jd-linkcol'> 601 <a href='rs_math.html#android_rs:native_acospi'>native_acospi</a> 602 </td> 603 <td class='jd-descrcol' width='100%'> 604 Approximate inverse cosine divided by pi 605 </td> 606 </tr> 607 <tr class='alt-color api apilevel-1'> 608 <td class='jd-linkcol'> 609 <a href='rs_math.html#android_rs:native_asin'>native_asin</a> 610 </td> 611 <td class='jd-descrcol' width='100%'> 612 Approximate inverse sine 613 </td> 614 </tr> 615 <tr class='alt-color api apilevel-1'> 616 <td class='jd-linkcol'> 617 <a href='rs_math.html#android_rs:native_asinh'>native_asinh</a> 618 </td> 619 <td class='jd-descrcol' width='100%'> 620 Approximate inverse hyperbolic sine 621 </td> 622 </tr> 623 <tr class='alt-color api apilevel-1'> 624 <td class='jd-linkcol'> 625 <a href='rs_math.html#android_rs:native_asinpi'>native_asinpi</a> 626 </td> 627 <td class='jd-descrcol' width='100%'> 628 Approximate inverse sine divided by pi 629 </td> 630 </tr> 631 <tr class='alt-color api apilevel-1'> 632 <td class='jd-linkcol'> 633 <a href='rs_math.html#android_rs:native_atan'>native_atan</a> 634 </td> 635 <td class='jd-descrcol' width='100%'> 636 Approximate inverse tangent 637 </td> 638 </tr> 639 <tr class='alt-color api apilevel-1'> 640 <td class='jd-linkcol'> 641 <a href='rs_math.html#android_rs:native_atan2'>native_atan2</a> 642 </td> 643 <td class='jd-descrcol' width='100%'> 644 Approximate inverse tangent of a ratio 645 </td> 646 </tr> 647 <tr class='alt-color api apilevel-1'> 648 <td class='jd-linkcol'> 649 <a href='rs_math.html#android_rs:native_atan2pi'>native_atan2pi</a> 650 </td> 651 <td class='jd-descrcol' width='100%'> 652 Approximate inverse tangent of a ratio, divided by pi 653 </td> 654 </tr> 655 <tr class='alt-color api apilevel-1'> 656 <td class='jd-linkcol'> 657 <a href='rs_math.html#android_rs:native_atanh'>native_atanh</a> 658 </td> 659 <td class='jd-descrcol' width='100%'> 660 Approximate inverse hyperbolic tangent 661 </td> 662 </tr> 663 <tr class='alt-color api apilevel-1'> 664 <td class='jd-linkcol'> 665 <a href='rs_math.html#android_rs:native_atanpi'>native_atanpi</a> 666 </td> 667 <td class='jd-descrcol' width='100%'> 668 Approximate inverse tangent divided by pi 669 </td> 670 </tr> 671 <tr class='alt-color api apilevel-1'> 672 <td class='jd-linkcol'> 673 <a href='rs_math.html#android_rs:native_cbrt'>native_cbrt</a> 674 </td> 675 <td class='jd-descrcol' width='100%'> 676 Approximate cube root 677 </td> 678 </tr> 679 <tr class='alt-color api apilevel-1'> 680 <td class='jd-linkcol'> 681 <a href='rs_math.html#android_rs:native_cos'>native_cos</a> 682 </td> 683 <td class='jd-descrcol' width='100%'> 684 Approximate cosine 685 </td> 686 </tr> 687 <tr class='alt-color api apilevel-1'> 688 <td class='jd-linkcol'> 689 <a href='rs_math.html#android_rs:native_cosh'>native_cosh</a> 690 </td> 691 <td class='jd-descrcol' width='100%'> 692 Approximate hypebolic cosine 693 </td> 694 </tr> 695 <tr class='alt-color api apilevel-1'> 696 <td class='jd-linkcol'> 697 <a href='rs_math.html#android_rs:native_cospi'>native_cospi</a> 698 </td> 699 <td class='jd-descrcol' width='100%'> 700 Approximate cosine of a number multiplied by pi 701 </td> 702 </tr> 703 <tr class='alt-color api apilevel-1'> 704 <td class='jd-linkcol'> 705 <a href='rs_math.html#android_rs:native_divide'>native_divide</a> 706 </td> 707 <td class='jd-descrcol' width='100%'> 708 Approximate division 709 </td> 710 </tr> 711 <tr class='alt-color api apilevel-1'> 712 <td class='jd-linkcol'> 713 <a href='rs_math.html#android_rs:native_exp'>native_exp</a> 714 </td> 715 <td class='jd-descrcol' width='100%'> 716 Approximate e raised to a number 717 </td> 718 </tr> 719 <tr class='alt-color api apilevel-1'> 720 <td class='jd-linkcol'> 721 <a href='rs_math.html#android_rs:native_exp10'>native_exp10</a> 722 </td> 723 <td class='jd-descrcol' width='100%'> 724 Approximate 10 raised to a number 725 </td> 726 </tr> 727 <tr class='alt-color api apilevel-1'> 728 <td class='jd-linkcol'> 729 <a href='rs_math.html#android_rs:native_exp2'>native_exp2</a> 730 </td> 731 <td class='jd-descrcol' width='100%'> 732 Approximate 2 raised to a number 733 </td> 734 </tr> 735 <tr class='alt-color api apilevel-1'> 736 <td class='jd-linkcol'> 737 <a href='rs_math.html#android_rs:native_expm1'>native_expm1</a> 738 </td> 739 <td class='jd-descrcol' width='100%'> 740 Approximate e raised to a number minus one 741 </td> 742 </tr> 743 <tr class='alt-color api apilevel-1'> 744 <td class='jd-linkcol'> 745 <a href='rs_math.html#android_rs:native_hypot'>native_hypot</a> 746 </td> 747 <td class='jd-descrcol' width='100%'> 748 Approximate hypotenuse 749 </td> 750 </tr> 751 <tr class='alt-color api apilevel-1'> 752 <td class='jd-linkcol'> 753 <a href='rs_math.html#android_rs:native_log'>native_log</a> 754 </td> 755 <td class='jd-descrcol' width='100%'> 756 Approximate natural logarithm 757 </td> 758 </tr> 759 <tr class='alt-color api apilevel-1'> 760 <td class='jd-linkcol'> 761 <a href='rs_math.html#android_rs:native_log10'>native_log10</a> 762 </td> 763 <td class='jd-descrcol' width='100%'> 764 Approximate base 10 logarithm 765 </td> 766 </tr> 767 <tr class='alt-color api apilevel-1'> 768 <td class='jd-linkcol'> 769 <a href='rs_math.html#android_rs:native_log1p'>native_log1p</a> 770 </td> 771 <td class='jd-descrcol' width='100%'> 772 Approximate natural logarithm of a value plus 1 773 </td> 774 </tr> 775 <tr class='alt-color api apilevel-1'> 776 <td class='jd-linkcol'> 777 <a href='rs_math.html#android_rs:native_log2'>native_log2</a> 778 </td> 779 <td class='jd-descrcol' width='100%'> 780 Approximate base 2 logarithm 781 </td> 782 </tr> 783 <tr class='alt-color api apilevel-1'> 784 <td class='jd-linkcol'> 785 <a href='rs_math.html#android_rs:native_powr'>native_powr</a> 786 </td> 787 <td class='jd-descrcol' width='100%'> 788 Approximate positive base raised to an exponent 789 </td> 790 </tr> 791 <tr class='alt-color api apilevel-1'> 792 <td class='jd-linkcol'> 793 <a href='rs_math.html#android_rs:native_recip'>native_recip</a> 794 </td> 795 <td class='jd-descrcol' width='100%'> 796 Approximate reciprocal 797 </td> 798 </tr> 799 <tr class='alt-color api apilevel-1'> 800 <td class='jd-linkcol'> 801 <a href='rs_math.html#android_rs:native_rootn'>native_rootn</a> 802 </td> 803 <td class='jd-descrcol' width='100%'> 804 Approximate nth root 805 </td> 806 </tr> 807 <tr class='alt-color api apilevel-1'> 808 <td class='jd-linkcol'> 809 <a href='rs_math.html#android_rs:native_rsqrt'>native_rsqrt</a> 810 </td> 811 <td class='jd-descrcol' width='100%'> 812 Approximate reciprocal of a square root 813 </td> 814 </tr> 815 <tr class='alt-color api apilevel-1'> 816 <td class='jd-linkcol'> 817 <a href='rs_math.html#android_rs:native_sin'>native_sin</a> 818 </td> 819 <td class='jd-descrcol' width='100%'> 820 Approximate sine 821 </td> 822 </tr> 823 <tr class='alt-color api apilevel-1'> 824 <td class='jd-linkcol'> 825 <a href='rs_math.html#android_rs:native_sincos'>native_sincos</a> 826 </td> 827 <td class='jd-descrcol' width='100%'> 828 Approximate sine and cosine 829 </td> 830 </tr> 831 <tr class='alt-color api apilevel-1'> 832 <td class='jd-linkcol'> 833 <a href='rs_math.html#android_rs:native_sinh'>native_sinh</a> 834 </td> 835 <td class='jd-descrcol' width='100%'> 836 Approximate hyperbolic sine 837 </td> 838 </tr> 839 <tr class='alt-color api apilevel-1'> 840 <td class='jd-linkcol'> 841 <a href='rs_math.html#android_rs:native_sinpi'>native_sinpi</a> 842 </td> 843 <td class='jd-descrcol' width='100%'> 844 Approximate sine of a number multiplied by pi 845 </td> 846 </tr> 847 <tr class='alt-color api apilevel-1'> 848 <td class='jd-linkcol'> 849 <a href='rs_math.html#android_rs:native_sqrt'>native_sqrt</a> 850 </td> 851 <td class='jd-descrcol' width='100%'> 852 Approximate square root 853 </td> 854 </tr> 855 <tr class='alt-color api apilevel-1'> 856 <td class='jd-linkcol'> 857 <a href='rs_math.html#android_rs:native_tan'>native_tan</a> 858 </td> 859 <td class='jd-descrcol' width='100%'> 860 Approximate tangent 861 </td> 862 </tr> 863 <tr class='alt-color api apilevel-1'> 864 <td class='jd-linkcol'> 865 <a href='rs_math.html#android_rs:native_tanh'>native_tanh</a> 866 </td> 867 <td class='jd-descrcol' width='100%'> 868 Approximate hyperbolic tangent 869 </td> 870 </tr> 871 <tr class='alt-color api apilevel-1'> 872 <td class='jd-linkcol'> 873 <a href='rs_math.html#android_rs:native_tanpi'>native_tanpi</a> 874 </td> 875 <td class='jd-descrcol' width='100%'> 876 Approximate tangent of a number multiplied by pi 877 </td> 878 </tr> 879 <tr class='alt-color api apilevel-1'> 880 <td class='jd-linkcol'> 881 <a href='rs_math.html#android_rs:nextafter'>nextafter</a> 882 </td> 883 <td class='jd-descrcol' width='100%'> 884 Next floating point number 885 </td> 886 </tr> 887 <tr class='alt-color api apilevel-1'> 888 <td class='jd-linkcol'> 889 <a href='rs_math.html#android_rs:pow'>pow</a> 890 </td> 891 <td class='jd-descrcol' width='100%'> 892 Base raised to an exponent 893 </td> 894 </tr> 895 <tr class='alt-color api apilevel-1'> 896 <td class='jd-linkcol'> 897 <a href='rs_math.html#android_rs:pown'>pown</a> 898 </td> 899 <td class='jd-descrcol' width='100%'> 900 Base raised to an integer exponent 901 </td> 902 </tr> 903 <tr class='alt-color api apilevel-1'> 904 <td class='jd-linkcol'> 905 <a href='rs_math.html#android_rs:powr'>powr</a> 906 </td> 907 <td class='jd-descrcol' width='100%'> 908 Positive base raised to an exponent 909 </td> 910 </tr> 911 <tr class='alt-color api apilevel-1'> 912 <td class='jd-linkcol'> 913 <a href='rs_math.html#android_rs:radians'>radians</a> 914 </td> 915 <td class='jd-descrcol' width='100%'> 916 Converts degrees into radians 917 </td> 918 </tr> 919 <tr class='alt-color api apilevel-1'> 920 <td class='jd-linkcol'> 921 <a href='rs_math.html#android_rs:remainder'>remainder</a> 922 </td> 923 <td class='jd-descrcol' width='100%'> 924 Remainder of a division 925 </td> 926 </tr> 927 <tr class='alt-color api apilevel-1'> 928 <td class='jd-linkcol'> 929 <a href='rs_math.html#android_rs:remquo'>remquo</a> 930 </td> 931 <td class='jd-descrcol' width='100%'> 932 Remainder and quotient of a division 933 </td> 934 </tr> 935 <tr class='alt-color api apilevel-1'> 936 <td class='jd-linkcol'> 937 <a href='rs_math.html#android_rs:rint'>rint</a> 938 </td> 939 <td class='jd-descrcol' width='100%'> 940 Round to even 941 </td> 942 </tr> 943 <tr class='alt-color api apilevel-1'> 944 <td class='jd-linkcol'> 945 <a href='rs_math.html#android_rs:rootn'>rootn</a> 946 </td> 947 <td class='jd-descrcol' width='100%'> 948 Nth root 949 </td> 950 </tr> 951 <tr class='alt-color api apilevel-1'> 952 <td class='jd-linkcol'> 953 <a href='rs_math.html#android_rs:round'>round</a> 954 </td> 955 <td class='jd-descrcol' width='100%'> 956 Round away from zero 957 </td> 958 </tr> 959 <tr class='alt-color api apilevel-1'> 960 <td class='jd-linkcol'> 961 <a href='rs_math.html#android_rs:rsRand'>rsRand</a> 962 </td> 963 <td class='jd-descrcol' width='100%'> 964 Pseudo-random number 965 </td> 966 </tr> 967 <tr class='alt-color api apilevel-1'> 968 <td class='jd-linkcol'> 969 <a href='rs_math.html#android_rs:rsqrt'>rsqrt</a> 970 </td> 971 <td class='jd-descrcol' width='100%'> 972 Reciprocal of a square root 973 </td> 974 </tr> 975 <tr class='alt-color api apilevel-1'> 976 <td class='jd-linkcol'> 977 <a href='rs_math.html#android_rs:sign'>sign</a> 978 </td> 979 <td class='jd-descrcol' width='100%'> 980 Sign of a value 981 </td> 982 </tr> 983 <tr class='alt-color api apilevel-1'> 984 <td class='jd-linkcol'> 985 <a href='rs_math.html#android_rs:sin'>sin</a> 986 </td> 987 <td class='jd-descrcol' width='100%'> 988 Sine 989 </td> 990 </tr> 991 <tr class='alt-color api apilevel-1'> 992 <td class='jd-linkcol'> 993 <a href='rs_math.html#android_rs:sincos'>sincos</a> 994 </td> 995 <td class='jd-descrcol' width='100%'> 996 Sine and cosine 997 </td> 998 </tr> 999 <tr class='alt-color api apilevel-1'> 1000 <td class='jd-linkcol'> 1001 <a href='rs_math.html#android_rs:sinh'>sinh</a> 1002 </td> 1003 <td class='jd-descrcol' width='100%'> 1004 Hyperbolic sine 1005 </td> 1006 </tr> 1007 <tr class='alt-color api apilevel-1'> 1008 <td class='jd-linkcol'> 1009 <a href='rs_math.html#android_rs:sinpi'>sinpi</a> 1010 </td> 1011 <td class='jd-descrcol' width='100%'> 1012 Sine of a number multiplied by pi 1013 </td> 1014 </tr> 1015 <tr class='alt-color api apilevel-1'> 1016 <td class='jd-linkcol'> 1017 <a href='rs_math.html#android_rs:sqrt'>sqrt</a> 1018 </td> 1019 <td class='jd-descrcol' width='100%'> 1020 Square root 1021 </td> 1022 </tr> 1023 <tr class='alt-color api apilevel-1'> 1024 <td class='jd-linkcol'> 1025 <a href='rs_math.html#android_rs:step'>step</a> 1026 </td> 1027 <td class='jd-descrcol' width='100%'> 1028 0 if less than a value, 0 otherwise 1029 </td> 1030 </tr> 1031 <tr class='alt-color api apilevel-1'> 1032 <td class='jd-linkcol'> 1033 <a href='rs_math.html#android_rs:tan'>tan</a> 1034 </td> 1035 <td class='jd-descrcol' width='100%'> 1036 Tangent 1037 </td> 1038 </tr> 1039 <tr class='alt-color api apilevel-1'> 1040 <td class='jd-linkcol'> 1041 <a href='rs_math.html#android_rs:tanh'>tanh</a> 1042 </td> 1043 <td class='jd-descrcol' width='100%'> 1044 Hyperbolic tangent 1045 </td> 1046 </tr> 1047 <tr class='alt-color api apilevel-1'> 1048 <td class='jd-linkcol'> 1049 <a href='rs_math.html#android_rs:tanpi'>tanpi</a> 1050 </td> 1051 <td class='jd-descrcol' width='100%'> 1052 Tangent of a number multiplied by pi 1053 </td> 1054 </tr> 1055 <tr class='alt-color api apilevel-1'> 1056 <td class='jd-linkcol'> 1057 <a href='rs_math.html#android_rs:tgamma'>tgamma</a> 1058 </td> 1059 <td class='jd-descrcol' width='100%'> 1060 Gamma function 1061 </td> 1062 </tr> 1063 <tr class='alt-color api apilevel-1'> 1064 <td class='jd-linkcol'> 1065 <a href='rs_math.html#android_rs:trunc'>trunc</a> 1066 </td> 1067 <td class='jd-descrcol' width='100%'> 1068 Truncates a floating point 1069 </td> 1070 </tr> 1071 </tbody></table> 1072 <table class='jd-sumtable'><tbody> 1073 <tr><th colspan='2'>Deprecated Functions</th></tr> 1074 <tr class='alt-color api apilevel-1'> 1075 <td class='jd-linkcol'> 1076 <a href='rs_math.html#android_rs:rsClamp'>rsClamp</a> 1077 </td> 1078 <td class='jd-descrcol' width='100%'> 1079 <b>Deprecated</b>. Restrain a value to a range 1080 </td> 1081 </tr> 1082 <tr class='alt-color api apilevel-1'> 1083 <td class='jd-linkcol'> 1084 <a href='rs_math.html#android_rs:rsFrac'>rsFrac</a> 1085 </td> 1086 <td class='jd-descrcol' width='100%'> 1087 <b>Deprecated</b>. Returns the fractional part of a float 1088 </td> 1089 </tr> 1090 </tbody></table> 1091 <h2>Constants</h2> 1092 <a name='android_rs:M_1_PI'></a> 1093 <div class='jd-details'> 1094 <h4 class='jd-details-title'> 1095 <span class='sympad'>M_1_PI</span> 1096 <span class='normal'>: 1 / pi, as a 32 bit float</span> 1097 </h4> 1098 <div class='jd-details-descr'> 1099 <table class='jd-tagtable'><tbody> 1100 <tr><td>Value: 0.318309886183790671537767526745028724f 1101 </td></tr> 1102 <br/> 1103 </tbody></table> 1104 </div> 1105 <div class='jd-tagdata jd-tagdescr'> 1106 <p> The inverse of pi, as a 32 bit float. 1107 </p> 1108 </div> 1109 </div> 1110 1111 <a name='android_rs:M_2_PI'></a> 1112 <div class='jd-details'> 1113 <h4 class='jd-details-title'> 1114 <span class='sympad'>M_2_PI</span> 1115 <span class='normal'>: 2 / pi, as a 32 bit float</span> 1116 </h4> 1117 <div class='jd-details-descr'> 1118 <table class='jd-tagtable'><tbody> 1119 <tr><td>Value: 0.636619772367581343075535053490057448f 1120 </td></tr> 1121 <br/> 1122 </tbody></table> 1123 </div> 1124 <div class='jd-tagdata jd-tagdescr'> 1125 <p> 2 divided by pi, as a 32 bit float. 1126 </p> 1127 </div> 1128 </div> 1129 1130 <a name='android_rs:M_2_SQRTPI'></a> 1131 <div class='jd-details'> 1132 <h4 class='jd-details-title'> 1133 <span class='sympad'>M_2_SQRTPI</span> 1134 <span class='normal'>: 2 / sqrt(pi), as a 32 bit float</span> 1135 </h4> 1136 <div class='jd-details-descr'> 1137 <table class='jd-tagtable'><tbody> 1138 <tr><td>Value: 1.128379167095512573896158903121545172f 1139 </td></tr> 1140 <br/> 1141 </tbody></table> 1142 </div> 1143 <div class='jd-tagdata jd-tagdescr'> 1144 <p> 2 divided by the square root of pi, as a 32 bit float. 1145 </p> 1146 </div> 1147 </div> 1148 1149 <a name='android_rs:M_E'></a> 1150 <div class='jd-details'> 1151 <h4 class='jd-details-title'> 1152 <span class='sympad'>M_E</span> 1153 <span class='normal'>: e, as a 32 bit float</span> 1154 </h4> 1155 <div class='jd-details-descr'> 1156 <table class='jd-tagtable'><tbody> 1157 <tr><td>Value: 2.718281828459045235360287471352662498f 1158 </td></tr> 1159 <br/> 1160 </tbody></table> 1161 </div> 1162 <div class='jd-tagdata jd-tagdescr'> 1163 <p> The number e, the base of the natural logarithm, as a 32 bit float. 1164 </p> 1165 </div> 1166 </div> 1167 1168 <a name='android_rs:M_LN10'></a> 1169 <div class='jd-details'> 1170 <h4 class='jd-details-title'> 1171 <span class='sympad'>M_LN10</span> 1172 <span class='normal'>: log_e(10), as a 32 bit float</span> 1173 </h4> 1174 <div class='jd-details-descr'> 1175 <table class='jd-tagtable'><tbody> 1176 <tr><td>Value: 2.302585092994045684017991454684364208f 1177 </td></tr> 1178 <br/> 1179 </tbody></table> 1180 </div> 1181 <div class='jd-tagdata jd-tagdescr'> 1182 <p> The natural logarithm of 10, as a 32 bit float. 1183 </p> 1184 </div> 1185 </div> 1186 1187 <a name='android_rs:M_LN2'></a> 1188 <div class='jd-details'> 1189 <h4 class='jd-details-title'> 1190 <span class='sympad'>M_LN2</span> 1191 <span class='normal'>: log_e(2), as a 32 bit float</span> 1192 </h4> 1193 <div class='jd-details-descr'> 1194 <table class='jd-tagtable'><tbody> 1195 <tr><td>Value: 0.693147180559945309417232121458176568f 1196 </td></tr> 1197 <br/> 1198 </tbody></table> 1199 </div> 1200 <div class='jd-tagdata jd-tagdescr'> 1201 <p> The natural logarithm of 2, as a 32 bit float. 1202 </p> 1203 </div> 1204 </div> 1205 1206 <a name='android_rs:M_LOG10E'></a> 1207 <div class='jd-details'> 1208 <h4 class='jd-details-title'> 1209 <span class='sympad'>M_LOG10E</span> 1210 <span class='normal'>: log_10(e), as a 32 bit float</span> 1211 </h4> 1212 <div class='jd-details-descr'> 1213 <table class='jd-tagtable'><tbody> 1214 <tr><td>Value: 0.434294481903251827651128918916605082f 1215 </td></tr> 1216 <br/> 1217 </tbody></table> 1218 </div> 1219 <div class='jd-tagdata jd-tagdescr'> 1220 <p> The logarithm base 10 of e, as a 32 bit float. 1221 </p> 1222 </div> 1223 </div> 1224 1225 <a name='android_rs:M_LOG2E'></a> 1226 <div class='jd-details'> 1227 <h4 class='jd-details-title'> 1228 <span class='sympad'>M_LOG2E</span> 1229 <span class='normal'>: log_2(e), as a 32 bit float</span> 1230 </h4> 1231 <div class='jd-details-descr'> 1232 <table class='jd-tagtable'><tbody> 1233 <tr><td>Value: 1.442695040888963407359924681001892137f 1234 </td></tr> 1235 <br/> 1236 </tbody></table> 1237 </div> 1238 <div class='jd-tagdata jd-tagdescr'> 1239 <p> The logarithm base 2 of e, as a 32 bit float. 1240 </p> 1241 </div> 1242 </div> 1243 1244 <a name='android_rs:M_PI'></a> 1245 <div class='jd-details'> 1246 <h4 class='jd-details-title'> 1247 <span class='sympad'>M_PI</span> 1248 <span class='normal'>: pi, as a 32 bit float</span> 1249 </h4> 1250 <div class='jd-details-descr'> 1251 <table class='jd-tagtable'><tbody> 1252 <tr><td>Value: 3.141592653589793238462643383279502884f 1253 </td></tr> 1254 <br/> 1255 </tbody></table> 1256 </div> 1257 <div class='jd-tagdata jd-tagdescr'> 1258 <p> The constant pi, as a 32 bit float. 1259 </p> 1260 </div> 1261 </div> 1262 1263 <a name='android_rs:M_PI_2'></a> 1264 <div class='jd-details'> 1265 <h4 class='jd-details-title'> 1266 <span class='sympad'>M_PI_2</span> 1267 <span class='normal'>: pi / 2, as a 32 bit float</span> 1268 </h4> 1269 <div class='jd-details-descr'> 1270 <table class='jd-tagtable'><tbody> 1271 <tr><td>Value: 1.570796326794896619231321691639751442f 1272 </td></tr> 1273 <br/> 1274 </tbody></table> 1275 </div> 1276 <div class='jd-tagdata jd-tagdescr'> 1277 <p> Pi divided by 2, as a 32 bit float. 1278 </p> 1279 </div> 1280 </div> 1281 1282 <a name='android_rs:M_PI_4'></a> 1283 <div class='jd-details'> 1284 <h4 class='jd-details-title'> 1285 <span class='sympad'>M_PI_4</span> 1286 <span class='normal'>: pi / 4, as a 32 bit float</span> 1287 </h4> 1288 <div class='jd-details-descr'> 1289 <table class='jd-tagtable'><tbody> 1290 <tr><td>Value: 0.785398163397448309615660845819875721f 1291 </td></tr> 1292 <br/> 1293 </tbody></table> 1294 </div> 1295 <div class='jd-tagdata jd-tagdescr'> 1296 <p> Pi divided by 4, as a 32 bit float. 1297 </p> 1298 </div> 1299 </div> 1300 1301 <a name='android_rs:M_SQRT1_2'></a> 1302 <div class='jd-details'> 1303 <h4 class='jd-details-title'> 1304 <span class='sympad'>M_SQRT1_2</span> 1305 <span class='normal'>: 1 / sqrt(2), as a 32 bit float</span> 1306 </h4> 1307 <div class='jd-details-descr'> 1308 <table class='jd-tagtable'><tbody> 1309 <tr><td>Value: 0.707106781186547524400844362104849039f 1310 </td></tr> 1311 <br/> 1312 </tbody></table> 1313 </div> 1314 <div class='jd-tagdata jd-tagdescr'> 1315 <p> The inverse of the square root of 2, as a 32 bit float. 1316 </p> 1317 </div> 1318 </div> 1319 1320 <a name='android_rs:M_SQRT2'></a> 1321 <div class='jd-details'> 1322 <h4 class='jd-details-title'> 1323 <span class='sympad'>M_SQRT2</span> 1324 <span class='normal'>: sqrt(2), as a 32 bit float</span> 1325 </h4> 1326 <div class='jd-details-descr'> 1327 <table class='jd-tagtable'><tbody> 1328 <tr><td>Value: 1.414213562373095048801688724209698079f 1329 </td></tr> 1330 <br/> 1331 </tbody></table> 1332 </div> 1333 <div class='jd-tagdata jd-tagdescr'> 1334 <p> The square root of 2, as a 32 bit float. 1335 </p> 1336 </div> 1337 </div> 1338 1339 <h2>Functions</h2> 1340 <a name='android_rs:abs'></a> 1341 <div class='jd-details'> 1342 <h4 class='jd-details-title'> 1343 <span class='sympad'>abs</span> 1344 <span class='normal'>: Absolute value of an integer</span> 1345 </h4> 1346 <div class='jd-details-descr'> 1347 <table class='jd-tagtable'><tbody> 1348 <tr> 1349 <td><a href='rs_value_types.html#android_rs:uchar'>uchar</a> abs(char v); 1350 </td> 1351 <td> </td> 1352 </tr> 1353 <tr> 1354 <td><a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> abs(<a href='rs_value_types.html#android_rs:char2'>char2</a> v); 1355 </td> 1356 <td> </td> 1357 </tr> 1358 <tr> 1359 <td><a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> abs(<a href='rs_value_types.html#android_rs:char3'>char3</a> v); 1360 </td> 1361 <td> </td> 1362 </tr> 1363 <tr> 1364 <td><a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> abs(<a href='rs_value_types.html#android_rs:char4'>char4</a> v); 1365 </td> 1366 <td> </td> 1367 </tr> 1368 <tr> 1369 <td><a href='rs_value_types.html#android_rs:uint'>uint</a> abs(int v); 1370 </td> 1371 <td> </td> 1372 </tr> 1373 <tr> 1374 <td><a href='rs_value_types.html#android_rs:uint2'>uint2</a> abs(<a href='rs_value_types.html#android_rs:int2'>int2</a> v); 1375 </td> 1376 <td> </td> 1377 </tr> 1378 <tr> 1379 <td><a href='rs_value_types.html#android_rs:uint3'>uint3</a> abs(<a href='rs_value_types.html#android_rs:int3'>int3</a> v); 1380 </td> 1381 <td> </td> 1382 </tr> 1383 <tr> 1384 <td><a href='rs_value_types.html#android_rs:uint4'>uint4</a> abs(<a href='rs_value_types.html#android_rs:int4'>int4</a> v); 1385 </td> 1386 <td> </td> 1387 </tr> 1388 <tr> 1389 <td><a href='rs_value_types.html#android_rs:ushort'>ushort</a> abs(short v); 1390 </td> 1391 <td> </td> 1392 </tr> 1393 <tr> 1394 <td><a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> abs(<a href='rs_value_types.html#android_rs:short2'>short2</a> v); 1395 </td> 1396 <td> </td> 1397 </tr> 1398 <tr> 1399 <td><a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> abs(<a href='rs_value_types.html#android_rs:short3'>short3</a> v); 1400 </td> 1401 <td> </td> 1402 </tr> 1403 <tr> 1404 <td><a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> abs(<a href='rs_value_types.html#android_rs:short4'>short4</a> v); 1405 </td> 1406 <td> </td> 1407 </tr> 1408 </tbody></table> 1409 </div> 1410 <div class='jd-tagdata jd-tagdescr'> 1411 <p> Returns the absolute value of an integer. 1412 </p> 1413 1414 <p> For floats, use <a href='rs_math.html#android_rs:fabs'>fabs</a>(). 1415 </p> 1416 </div> 1417 </div> 1418 1419 <a name='android_rs:acos'></a> 1420 <div class='jd-details'> 1421 <h4 class='jd-details-title'> 1422 <span class='sympad'>acos</span> 1423 <span class='normal'>: Inverse cosine</span> 1424 </h4> 1425 <div class='jd-details-descr'> 1426 <table class='jd-tagtable'><tbody> 1427 <tr> 1428 <td>float acos(float v); 1429 </td> 1430 <td> </td> 1431 </tr> 1432 <tr> 1433 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> acos(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1434 </td> 1435 <td> </td> 1436 </tr> 1437 <tr> 1438 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> acos(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1439 </td> 1440 <td> </td> 1441 </tr> 1442 <tr> 1443 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> acos(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1444 </td> 1445 <td> </td> 1446 </tr> 1447 </tbody></table> 1448 </div> 1449 <div class='jd-tagdata jd-tagdescr'> 1450 <p> Returns the inverse cosine, in radians. 1451 </p> 1452 1453 <p> See also <a href='rs_math.html#android_rs:native_acos'>native_acos</a>(). 1454 </p> 1455 </div> 1456 </div> 1457 1458 <a name='android_rs:acosh'></a> 1459 <div class='jd-details'> 1460 <h4 class='jd-details-title'> 1461 <span class='sympad'>acosh</span> 1462 <span class='normal'>: Inverse hyperbolic cosine</span> 1463 </h4> 1464 <div class='jd-details-descr'> 1465 <table class='jd-tagtable'><tbody> 1466 <tr> 1467 <td>float acosh(float v); 1468 </td> 1469 <td> </td> 1470 </tr> 1471 <tr> 1472 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> acosh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1473 </td> 1474 <td> </td> 1475 </tr> 1476 <tr> 1477 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> acosh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1478 </td> 1479 <td> </td> 1480 </tr> 1481 <tr> 1482 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> acosh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1483 </td> 1484 <td> </td> 1485 </tr> 1486 </tbody></table> 1487 </div> 1488 <div class='jd-tagdata jd-tagdescr'> 1489 <p> Returns the inverse hyperbolic cosine, in radians. 1490 </p> 1491 1492 <p> See also <a href='rs_math.html#android_rs:native_acosh'>native_acosh</a>(). 1493 </p> 1494 </div> 1495 </div> 1496 1497 <a name='android_rs:acospi'></a> 1498 <div class='jd-details'> 1499 <h4 class='jd-details-title'> 1500 <span class='sympad'>acospi</span> 1501 <span class='normal'>: Inverse cosine divided by pi</span> 1502 </h4> 1503 <div class='jd-details-descr'> 1504 <table class='jd-tagtable'><tbody> 1505 <tr> 1506 <td>float acospi(float v); 1507 </td> 1508 <td> </td> 1509 </tr> 1510 <tr> 1511 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> acospi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1512 </td> 1513 <td> </td> 1514 </tr> 1515 <tr> 1516 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> acospi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1517 </td> 1518 <td> </td> 1519 </tr> 1520 <tr> 1521 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> acospi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1522 </td> 1523 <td> </td> 1524 </tr> 1525 </tbody></table> 1526 </div> 1527 <div class='jd-tagdata jd-tagdescr'> 1528 <p> Returns the inverse cosine in radians, divided by pi. 1529 </p> 1530 1531 <p> To get an inverse cosine measured in degrees, use <code>acospi(a) * 180.f</code>. 1532 </p> 1533 1534 <p> See also <a href='rs_math.html#android_rs:native_acospi'>native_acospi</a>(). 1535 </p> 1536 </div> 1537 </div> 1538 1539 <a name='android_rs:asin'></a> 1540 <div class='jd-details'> 1541 <h4 class='jd-details-title'> 1542 <span class='sympad'>asin</span> 1543 <span class='normal'>: Inverse sine</span> 1544 </h4> 1545 <div class='jd-details-descr'> 1546 <table class='jd-tagtable'><tbody> 1547 <tr> 1548 <td>float asin(float v); 1549 </td> 1550 <td> </td> 1551 </tr> 1552 <tr> 1553 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> asin(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1554 </td> 1555 <td> </td> 1556 </tr> 1557 <tr> 1558 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> asin(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1559 </td> 1560 <td> </td> 1561 </tr> 1562 <tr> 1563 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> asin(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1564 </td> 1565 <td> </td> 1566 </tr> 1567 </tbody></table> 1568 </div> 1569 <div class='jd-tagdata jd-tagdescr'> 1570 <p> Returns the inverse sine, in radians. 1571 </p> 1572 1573 <p> See also <a href='rs_math.html#android_rs:native_asin'>native_asin</a>(). 1574 </p> 1575 </div> 1576 </div> 1577 1578 <a name='android_rs:asinh'></a> 1579 <div class='jd-details'> 1580 <h4 class='jd-details-title'> 1581 <span class='sympad'>asinh</span> 1582 <span class='normal'>: Inverse hyperbolic sine</span> 1583 </h4> 1584 <div class='jd-details-descr'> 1585 <table class='jd-tagtable'><tbody> 1586 <tr> 1587 <td>float asinh(float v); 1588 </td> 1589 <td> </td> 1590 </tr> 1591 <tr> 1592 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> asinh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1593 </td> 1594 <td> </td> 1595 </tr> 1596 <tr> 1597 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> asinh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1598 </td> 1599 <td> </td> 1600 </tr> 1601 <tr> 1602 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> asinh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1603 </td> 1604 <td> </td> 1605 </tr> 1606 </tbody></table> 1607 </div> 1608 <div class='jd-tagdata jd-tagdescr'> 1609 <p> Returns the inverse hyperbolic sine, in radians. 1610 </p> 1611 1612 <p> See also <a href='rs_math.html#android_rs:native_asinh'>native_asinh</a>(). 1613 </p> 1614 </div> 1615 </div> 1616 1617 <a name='android_rs:asinpi'></a> 1618 <div class='jd-details'> 1619 <h4 class='jd-details-title'> 1620 <span class='sympad'>asinpi</span> 1621 <span class='normal'>: Inverse sine divided by pi</span> 1622 </h4> 1623 <div class='jd-details-descr'> 1624 <table class='jd-tagtable'><tbody> 1625 <tr> 1626 <td>float asinpi(float v); 1627 </td> 1628 <td> </td> 1629 </tr> 1630 <tr> 1631 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> asinpi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1632 </td> 1633 <td> </td> 1634 </tr> 1635 <tr> 1636 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> asinpi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1637 </td> 1638 <td> </td> 1639 </tr> 1640 <tr> 1641 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> asinpi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1642 </td> 1643 <td> </td> 1644 </tr> 1645 </tbody></table> 1646 </div> 1647 <div class='jd-tagdata jd-tagdescr'> 1648 <p> Returns the inverse sine in radians, divided by pi. 1649 </p> 1650 1651 <p> To get an inverse sine measured in degrees, use <code>asinpi(a) * 180.f</code>. 1652 </p> 1653 1654 <p> See also <a href='rs_math.html#android_rs:native_asinpi'>native_asinpi</a>(). 1655 </p> 1656 </div> 1657 </div> 1658 1659 <a name='android_rs:atan'></a> 1660 <div class='jd-details'> 1661 <h4 class='jd-details-title'> 1662 <span class='sympad'>atan</span> 1663 <span class='normal'>: Inverse tangent</span> 1664 </h4> 1665 <div class='jd-details-descr'> 1666 <table class='jd-tagtable'><tbody> 1667 <tr> 1668 <td>float atan(float v); 1669 </td> 1670 <td> </td> 1671 </tr> 1672 <tr> 1673 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> atan(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1674 </td> 1675 <td> </td> 1676 </tr> 1677 <tr> 1678 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> atan(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1679 </td> 1680 <td> </td> 1681 </tr> 1682 <tr> 1683 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> atan(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1684 </td> 1685 <td> </td> 1686 </tr> 1687 </tbody></table> 1688 </div> 1689 <div class='jd-tagdata jd-tagdescr'> 1690 <p> Returns the inverse tangent, in radians. 1691 </p> 1692 1693 <p> See also <a href='rs_math.html#android_rs:native_atan'>native_atan</a>(). 1694 </p> 1695 </div> 1696 </div> 1697 1698 <a name='android_rs:atan2'></a> 1699 <div class='jd-details'> 1700 <h4 class='jd-details-title'> 1701 <span class='sympad'>atan2</span> 1702 <span class='normal'>: Inverse tangent of a ratio</span> 1703 </h4> 1704 <div class='jd-details-descr'> 1705 <table class='jd-tagtable'><tbody> 1706 <tr> 1707 <td>float atan2(float numerator, float denominator); 1708 </td> 1709 <td> </td> 1710 </tr> 1711 <tr> 1712 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> atan2(<a href='rs_value_types.html#android_rs:float2'>float2</a> numerator, <a href='rs_value_types.html#android_rs:float2'>float2</a> denominator); 1713 </td> 1714 <td> </td> 1715 </tr> 1716 <tr> 1717 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> atan2(<a href='rs_value_types.html#android_rs:float3'>float3</a> numerator, <a href='rs_value_types.html#android_rs:float3'>float3</a> denominator); 1718 </td> 1719 <td> </td> 1720 </tr> 1721 <tr> 1722 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> atan2(<a href='rs_value_types.html#android_rs:float4'>float4</a> numerator, <a href='rs_value_types.html#android_rs:float4'>float4</a> denominator); 1723 </td> 1724 <td> </td> 1725 </tr> 1726 </tbody></table> 1727 </div> 1728 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 1729 <table class='jd-tagtable'><tbody> 1730 <tr><th>numerator</th><td>Numerator.</td></tr> 1731 <tr><th>denominator</th><td>Denominator. Can be 0.</td></tr> 1732 </tbody></table> 1733 </div> 1734 <div class='jd-tagdata jd-tagdescr'> 1735 <p> Returns the inverse tangent of <code>(numerator / denominator)</code>, in radians. 1736 </p> 1737 1738 <p> See also <a href='rs_math.html#android_rs:native_atan2'>native_atan2</a>(). 1739 </p> 1740 </div> 1741 </div> 1742 1743 <a name='android_rs:atan2pi'></a> 1744 <div class='jd-details'> 1745 <h4 class='jd-details-title'> 1746 <span class='sympad'>atan2pi</span> 1747 <span class='normal'>: Inverse tangent of a ratio, divided by pi</span> 1748 </h4> 1749 <div class='jd-details-descr'> 1750 <table class='jd-tagtable'><tbody> 1751 <tr> 1752 <td>float atan2pi(float numerator, float denominator); 1753 </td> 1754 <td> </td> 1755 </tr> 1756 <tr> 1757 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> atan2pi(<a href='rs_value_types.html#android_rs:float2'>float2</a> numerator, <a href='rs_value_types.html#android_rs:float2'>float2</a> denominator); 1758 </td> 1759 <td> </td> 1760 </tr> 1761 <tr> 1762 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> atan2pi(<a href='rs_value_types.html#android_rs:float3'>float3</a> numerator, <a href='rs_value_types.html#android_rs:float3'>float3</a> denominator); 1763 </td> 1764 <td> </td> 1765 </tr> 1766 <tr> 1767 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> atan2pi(<a href='rs_value_types.html#android_rs:float4'>float4</a> numerator, <a href='rs_value_types.html#android_rs:float4'>float4</a> denominator); 1768 </td> 1769 <td> </td> 1770 </tr> 1771 </tbody></table> 1772 </div> 1773 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 1774 <table class='jd-tagtable'><tbody> 1775 <tr><th>numerator</th><td>Numerator.</td></tr> 1776 <tr><th>denominator</th><td>Denominator. Can be 0.</td></tr> 1777 </tbody></table> 1778 </div> 1779 <div class='jd-tagdata jd-tagdescr'> 1780 <p> Returns the inverse tangent of <code>(numerator / denominator)</code>, in radians, divided by pi. 1781 </p> 1782 1783 <p> To get an inverse tangent measured in degrees, use <code>atan2pi(n, d) * 180.f</code>. 1784 </p> 1785 1786 <p> See also <a href='rs_math.html#android_rs:native_atan2pi'>native_atan2pi</a>(). 1787 </p> 1788 </div> 1789 </div> 1790 1791 <a name='android_rs:atanh'></a> 1792 <div class='jd-details'> 1793 <h4 class='jd-details-title'> 1794 <span class='sympad'>atanh</span> 1795 <span class='normal'>: Inverse hyperbolic tangent</span> 1796 </h4> 1797 <div class='jd-details-descr'> 1798 <table class='jd-tagtable'><tbody> 1799 <tr> 1800 <td>float atanh(float v); 1801 </td> 1802 <td> </td> 1803 </tr> 1804 <tr> 1805 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> atanh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1806 </td> 1807 <td> </td> 1808 </tr> 1809 <tr> 1810 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> atanh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1811 </td> 1812 <td> </td> 1813 </tr> 1814 <tr> 1815 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> atanh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1816 </td> 1817 <td> </td> 1818 </tr> 1819 </tbody></table> 1820 </div> 1821 <div class='jd-tagdata jd-tagdescr'> 1822 <p> Returns the inverse hyperbolic tangent, in radians. 1823 </p> 1824 1825 <p> See also <a href='rs_math.html#android_rs:native_atanh'>native_atanh</a>(). 1826 </p> 1827 </div> 1828 </div> 1829 1830 <a name='android_rs:atanpi'></a> 1831 <div class='jd-details'> 1832 <h4 class='jd-details-title'> 1833 <span class='sympad'>atanpi</span> 1834 <span class='normal'>: Inverse tangent divided by pi</span> 1835 </h4> 1836 <div class='jd-details-descr'> 1837 <table class='jd-tagtable'><tbody> 1838 <tr> 1839 <td>float atanpi(float v); 1840 </td> 1841 <td> </td> 1842 </tr> 1843 <tr> 1844 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> atanpi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1845 </td> 1846 <td> </td> 1847 </tr> 1848 <tr> 1849 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> atanpi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1850 </td> 1851 <td> </td> 1852 </tr> 1853 <tr> 1854 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> atanpi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1855 </td> 1856 <td> </td> 1857 </tr> 1858 </tbody></table> 1859 </div> 1860 <div class='jd-tagdata jd-tagdescr'> 1861 <p> Returns the inverse tangent in radians, divided by pi. 1862 </p> 1863 1864 <p> To get an inverse tangent measured in degrees, use <code>atanpi(a) * 180.f</code>. 1865 </p> 1866 1867 <p> See also <a href='rs_math.html#android_rs:native_atanpi'>native_atanpi</a>(). 1868 </p> 1869 </div> 1870 </div> 1871 1872 <a name='android_rs:cbrt'></a> 1873 <div class='jd-details'> 1874 <h4 class='jd-details-title'> 1875 <span class='sympad'>cbrt</span> 1876 <span class='normal'>: Cube root</span> 1877 </h4> 1878 <div class='jd-details-descr'> 1879 <table class='jd-tagtable'><tbody> 1880 <tr> 1881 <td>float cbrt(float v); 1882 </td> 1883 <td> </td> 1884 </tr> 1885 <tr> 1886 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> cbrt(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1887 </td> 1888 <td> </td> 1889 </tr> 1890 <tr> 1891 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> cbrt(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1892 </td> 1893 <td> </td> 1894 </tr> 1895 <tr> 1896 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> cbrt(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1897 </td> 1898 <td> </td> 1899 </tr> 1900 </tbody></table> 1901 </div> 1902 <div class='jd-tagdata jd-tagdescr'> 1903 <p> Returns the cube root. 1904 </p> 1905 1906 <p> See also <a href='rs_math.html#android_rs:native_cbrt'>native_cbrt</a>(). 1907 </p> 1908 </div> 1909 </div> 1910 1911 <a name='android_rs:ceil'></a> 1912 <div class='jd-details'> 1913 <h4 class='jd-details-title'> 1914 <span class='sympad'>ceil</span> 1915 <span class='normal'>: Smallest integer not less than a value</span> 1916 </h4> 1917 <div class='jd-details-descr'> 1918 <table class='jd-tagtable'><tbody> 1919 <tr> 1920 <td>float ceil(float v); 1921 </td> 1922 <td> </td> 1923 </tr> 1924 <tr> 1925 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> ceil(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 1926 </td> 1927 <td> </td> 1928 </tr> 1929 <tr> 1930 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> ceil(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 1931 </td> 1932 <td> </td> 1933 </tr> 1934 <tr> 1935 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> ceil(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 1936 </td> 1937 <td> </td> 1938 </tr> 1939 </tbody></table> 1940 </div> 1941 <div class='jd-tagdata jd-tagdescr'> 1942 <p> Returns the smallest integer not less than a value. 1943 </p> 1944 1945 <p> For example, <code>ceil(1.2f)</code> returns 2.f, and <code>ceil(-1.2f)</code> returns -1.f. 1946 </p> 1947 1948 <p> See also <a href='rs_math.html#android_rs:floor'>floor</a>(). 1949 </p> 1950 </div> 1951 </div> 1952 1953 <a name='android_rs:clamp'></a> 1954 <div class='jd-details'> 1955 <h4 class='jd-details-title'> 1956 <span class='sympad'>clamp</span> 1957 <span class='normal'>: Restrain a value to a range</span> 1958 </h4> 1959 <div class='jd-details-descr'> 1960 <table class='jd-tagtable'><tbody> 1961 <tr> 1962 <td>char clamp(char value, char min_value, char max_value); 1963 </td> 1964 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 1965 </td> 1966 </tr> 1967 <tr> 1968 <td><a href='rs_value_types.html#android_rs:char2'>char2</a> clamp(<a href='rs_value_types.html#android_rs:char2'>char2</a> value, char min_value, char max_value); 1969 </td> 1970 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 1971 </td> 1972 </tr> 1973 <tr> 1974 <td><a href='rs_value_types.html#android_rs:char2'>char2</a> clamp(<a href='rs_value_types.html#android_rs:char2'>char2</a> value, <a href='rs_value_types.html#android_rs:char2'>char2</a> min_value, <a href='rs_value_types.html#android_rs:char2'>char2</a> max_value); 1975 </td> 1976 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 1977 </td> 1978 </tr> 1979 <tr> 1980 <td><a href='rs_value_types.html#android_rs:char3'>char3</a> clamp(<a href='rs_value_types.html#android_rs:char3'>char3</a> value, char min_value, char max_value); 1981 </td> 1982 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 1983 </td> 1984 </tr> 1985 <tr> 1986 <td><a href='rs_value_types.html#android_rs:char3'>char3</a> clamp(<a href='rs_value_types.html#android_rs:char3'>char3</a> value, <a href='rs_value_types.html#android_rs:char3'>char3</a> min_value, <a href='rs_value_types.html#android_rs:char3'>char3</a> max_value); 1987 </td> 1988 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 1989 </td> 1990 </tr> 1991 <tr> 1992 <td><a href='rs_value_types.html#android_rs:char4'>char4</a> clamp(<a href='rs_value_types.html#android_rs:char4'>char4</a> value, char min_value, char max_value); 1993 </td> 1994 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 1995 </td> 1996 </tr> 1997 <tr> 1998 <td><a href='rs_value_types.html#android_rs:char4'>char4</a> clamp(<a href='rs_value_types.html#android_rs:char4'>char4</a> value, <a href='rs_value_types.html#android_rs:char4'>char4</a> min_value, <a href='rs_value_types.html#android_rs:char4'>char4</a> max_value); 1999 </td> 2000 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2001 </td> 2002 </tr> 2003 <tr> 2004 <td>float clamp(float value, float min_value, float max_value); 2005 </td> 2006 <td> </td> 2007 </tr> 2008 <tr> 2009 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> clamp(<a href='rs_value_types.html#android_rs:float2'>float2</a> value, float min_value, float max_value); 2010 </td> 2011 <td> </td> 2012 </tr> 2013 <tr> 2014 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> clamp(<a href='rs_value_types.html#android_rs:float2'>float2</a> value, <a href='rs_value_types.html#android_rs:float2'>float2</a> min_value, <a href='rs_value_types.html#android_rs:float2'>float2</a> max_value); 2015 </td> 2016 <td> </td> 2017 </tr> 2018 <tr> 2019 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> clamp(<a href='rs_value_types.html#android_rs:float3'>float3</a> value, float min_value, float max_value); 2020 </td> 2021 <td> </td> 2022 </tr> 2023 <tr> 2024 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> clamp(<a href='rs_value_types.html#android_rs:float3'>float3</a> value, <a href='rs_value_types.html#android_rs:float3'>float3</a> min_value, <a href='rs_value_types.html#android_rs:float3'>float3</a> max_value); 2025 </td> 2026 <td> </td> 2027 </tr> 2028 <tr> 2029 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> clamp(<a href='rs_value_types.html#android_rs:float4'>float4</a> value, float min_value, float max_value); 2030 </td> 2031 <td> </td> 2032 </tr> 2033 <tr> 2034 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> clamp(<a href='rs_value_types.html#android_rs:float4'>float4</a> value, <a href='rs_value_types.html#android_rs:float4'>float4</a> min_value, <a href='rs_value_types.html#android_rs:float4'>float4</a> max_value); 2035 </td> 2036 <td> </td> 2037 </tr> 2038 <tr> 2039 <td>int clamp(int value, int min_value, int max_value); 2040 </td> 2041 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2042 </td> 2043 </tr> 2044 <tr> 2045 <td><a href='rs_value_types.html#android_rs:int2'>int2</a> clamp(<a href='rs_value_types.html#android_rs:int2'>int2</a> value, int min_value, int max_value); 2046 </td> 2047 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2048 </td> 2049 </tr> 2050 <tr> 2051 <td><a href='rs_value_types.html#android_rs:int2'>int2</a> clamp(<a href='rs_value_types.html#android_rs:int2'>int2</a> value, <a href='rs_value_types.html#android_rs:int2'>int2</a> min_value, <a href='rs_value_types.html#android_rs:int2'>int2</a> max_value); 2052 </td> 2053 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2054 </td> 2055 </tr> 2056 <tr> 2057 <td><a href='rs_value_types.html#android_rs:int3'>int3</a> clamp(<a href='rs_value_types.html#android_rs:int3'>int3</a> value, int min_value, int max_value); 2058 </td> 2059 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2060 </td> 2061 </tr> 2062 <tr> 2063 <td><a href='rs_value_types.html#android_rs:int3'>int3</a> clamp(<a href='rs_value_types.html#android_rs:int3'>int3</a> value, <a href='rs_value_types.html#android_rs:int3'>int3</a> min_value, <a href='rs_value_types.html#android_rs:int3'>int3</a> max_value); 2064 </td> 2065 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2066 </td> 2067 </tr> 2068 <tr> 2069 <td><a href='rs_value_types.html#android_rs:int4'>int4</a> clamp(<a href='rs_value_types.html#android_rs:int4'>int4</a> value, int min_value, int max_value); 2070 </td> 2071 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2072 </td> 2073 </tr> 2074 <tr> 2075 <td><a href='rs_value_types.html#android_rs:int4'>int4</a> clamp(<a href='rs_value_types.html#android_rs:int4'>int4</a> value, <a href='rs_value_types.html#android_rs:int4'>int4</a> min_value, <a href='rs_value_types.html#android_rs:int4'>int4</a> max_value); 2076 </td> 2077 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2078 </td> 2079 </tr> 2080 <tr> 2081 <td>long clamp(long value, long min_value, long max_value); 2082 </td> 2083 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2084 </td> 2085 </tr> 2086 <tr> 2087 <td><a href='rs_value_types.html#android_rs:long2'>long2</a> clamp(<a href='rs_value_types.html#android_rs:long2'>long2</a> value, long min_value, long max_value); 2088 </td> 2089 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2090 </td> 2091 </tr> 2092 <tr> 2093 <td><a href='rs_value_types.html#android_rs:long2'>long2</a> clamp(<a href='rs_value_types.html#android_rs:long2'>long2</a> value, <a href='rs_value_types.html#android_rs:long2'>long2</a> min_value, <a href='rs_value_types.html#android_rs:long2'>long2</a> max_value); 2094 </td> 2095 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2096 </td> 2097 </tr> 2098 <tr> 2099 <td><a href='rs_value_types.html#android_rs:long3'>long3</a> clamp(<a href='rs_value_types.html#android_rs:long3'>long3</a> value, long min_value, long max_value); 2100 </td> 2101 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2102 </td> 2103 </tr> 2104 <tr> 2105 <td><a href='rs_value_types.html#android_rs:long3'>long3</a> clamp(<a href='rs_value_types.html#android_rs:long3'>long3</a> value, <a href='rs_value_types.html#android_rs:long3'>long3</a> min_value, <a href='rs_value_types.html#android_rs:long3'>long3</a> max_value); 2106 </td> 2107 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2108 </td> 2109 </tr> 2110 <tr> 2111 <td><a href='rs_value_types.html#android_rs:long4'>long4</a> clamp(<a href='rs_value_types.html#android_rs:long4'>long4</a> value, long min_value, long max_value); 2112 </td> 2113 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2114 </td> 2115 </tr> 2116 <tr> 2117 <td><a href='rs_value_types.html#android_rs:long4'>long4</a> clamp(<a href='rs_value_types.html#android_rs:long4'>long4</a> value, <a href='rs_value_types.html#android_rs:long4'>long4</a> min_value, <a href='rs_value_types.html#android_rs:long4'>long4</a> max_value); 2118 </td> 2119 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2120 </td> 2121 </tr> 2122 <tr> 2123 <td>short clamp(short value, short min_value, short max_value); 2124 </td> 2125 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2126 </td> 2127 </tr> 2128 <tr> 2129 <td><a href='rs_value_types.html#android_rs:short2'>short2</a> clamp(<a href='rs_value_types.html#android_rs:short2'>short2</a> value, short min_value, short max_value); 2130 </td> 2131 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2132 </td> 2133 </tr> 2134 <tr> 2135 <td><a href='rs_value_types.html#android_rs:short2'>short2</a> clamp(<a href='rs_value_types.html#android_rs:short2'>short2</a> value, <a href='rs_value_types.html#android_rs:short2'>short2</a> min_value, <a href='rs_value_types.html#android_rs:short2'>short2</a> max_value); 2136 </td> 2137 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2138 </td> 2139 </tr> 2140 <tr> 2141 <td><a href='rs_value_types.html#android_rs:short3'>short3</a> clamp(<a href='rs_value_types.html#android_rs:short3'>short3</a> value, short min_value, short max_value); 2142 </td> 2143 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2144 </td> 2145 </tr> 2146 <tr> 2147 <td><a href='rs_value_types.html#android_rs:short3'>short3</a> clamp(<a href='rs_value_types.html#android_rs:short3'>short3</a> value, <a href='rs_value_types.html#android_rs:short3'>short3</a> min_value, <a href='rs_value_types.html#android_rs:short3'>short3</a> max_value); 2148 </td> 2149 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2150 </td> 2151 </tr> 2152 <tr> 2153 <td><a href='rs_value_types.html#android_rs:short4'>short4</a> clamp(<a href='rs_value_types.html#android_rs:short4'>short4</a> value, short min_value, short max_value); 2154 </td> 2155 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2156 </td> 2157 </tr> 2158 <tr> 2159 <td><a href='rs_value_types.html#android_rs:short4'>short4</a> clamp(<a href='rs_value_types.html#android_rs:short4'>short4</a> value, <a href='rs_value_types.html#android_rs:short4'>short4</a> min_value, <a href='rs_value_types.html#android_rs:short4'>short4</a> max_value); 2160 </td> 2161 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2162 </td> 2163 </tr> 2164 <tr> 2165 <td><a href='rs_value_types.html#android_rs:uchar'>uchar</a> clamp(<a href='rs_value_types.html#android_rs:uchar'>uchar</a> value, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> min_value, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> max_value); 2166 </td> 2167 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2168 </td> 2169 </tr> 2170 <tr> 2171 <td><a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> clamp(<a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> value, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> min_value, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> max_value); 2172 </td> 2173 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2174 </td> 2175 </tr> 2176 <tr> 2177 <td><a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> clamp(<a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> value, <a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> min_value, <a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> max_value); 2178 </td> 2179 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2180 </td> 2181 </tr> 2182 <tr> 2183 <td><a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> clamp(<a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> value, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> min_value, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> max_value); 2184 </td> 2185 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2186 </td> 2187 </tr> 2188 <tr> 2189 <td><a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> clamp(<a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> value, <a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> min_value, <a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> max_value); 2190 </td> 2191 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2192 </td> 2193 </tr> 2194 <tr> 2195 <td><a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> clamp(<a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> value, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> min_value, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> max_value); 2196 </td> 2197 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2198 </td> 2199 </tr> 2200 <tr> 2201 <td><a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> clamp(<a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> value, <a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> min_value, <a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> max_value); 2202 </td> 2203 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2204 </td> 2205 </tr> 2206 <tr> 2207 <td><a href='rs_value_types.html#android_rs:uint'>uint</a> clamp(<a href='rs_value_types.html#android_rs:uint'>uint</a> value, <a href='rs_value_types.html#android_rs:uint'>uint</a> min_value, <a href='rs_value_types.html#android_rs:uint'>uint</a> max_value); 2208 </td> 2209 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2210 </td> 2211 </tr> 2212 <tr> 2213 <td><a href='rs_value_types.html#android_rs:uint2'>uint2</a> clamp(<a href='rs_value_types.html#android_rs:uint2'>uint2</a> value, <a href='rs_value_types.html#android_rs:uint'>uint</a> min_value, <a href='rs_value_types.html#android_rs:uint'>uint</a> max_value); 2214 </td> 2215 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2216 </td> 2217 </tr> 2218 <tr> 2219 <td><a href='rs_value_types.html#android_rs:uint2'>uint2</a> clamp(<a href='rs_value_types.html#android_rs:uint2'>uint2</a> value, <a href='rs_value_types.html#android_rs:uint2'>uint2</a> min_value, <a href='rs_value_types.html#android_rs:uint2'>uint2</a> max_value); 2220 </td> 2221 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2222 </td> 2223 </tr> 2224 <tr> 2225 <td><a href='rs_value_types.html#android_rs:uint3'>uint3</a> clamp(<a href='rs_value_types.html#android_rs:uint3'>uint3</a> value, <a href='rs_value_types.html#android_rs:uint'>uint</a> min_value, <a href='rs_value_types.html#android_rs:uint'>uint</a> max_value); 2226 </td> 2227 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2228 </td> 2229 </tr> 2230 <tr> 2231 <td><a href='rs_value_types.html#android_rs:uint3'>uint3</a> clamp(<a href='rs_value_types.html#android_rs:uint3'>uint3</a> value, <a href='rs_value_types.html#android_rs:uint3'>uint3</a> min_value, <a href='rs_value_types.html#android_rs:uint3'>uint3</a> max_value); 2232 </td> 2233 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2234 </td> 2235 </tr> 2236 <tr> 2237 <td><a href='rs_value_types.html#android_rs:uint4'>uint4</a> clamp(<a href='rs_value_types.html#android_rs:uint4'>uint4</a> value, <a href='rs_value_types.html#android_rs:uint'>uint</a> min_value, <a href='rs_value_types.html#android_rs:uint'>uint</a> max_value); 2238 </td> 2239 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2240 </td> 2241 </tr> 2242 <tr> 2243 <td><a href='rs_value_types.html#android_rs:uint4'>uint4</a> clamp(<a href='rs_value_types.html#android_rs:uint4'>uint4</a> value, <a href='rs_value_types.html#android_rs:uint4'>uint4</a> min_value, <a href='rs_value_types.html#android_rs:uint4'>uint4</a> max_value); 2244 </td> 2245 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2246 </td> 2247 </tr> 2248 <tr> 2249 <td><a href='rs_value_types.html#android_rs:ulong'>ulong</a> clamp(<a href='rs_value_types.html#android_rs:ulong'>ulong</a> value, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> min_value, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> max_value); 2250 </td> 2251 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2252 </td> 2253 </tr> 2254 <tr> 2255 <td><a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> clamp(<a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> value, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> min_value, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> max_value); 2256 </td> 2257 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2258 </td> 2259 </tr> 2260 <tr> 2261 <td><a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> clamp(<a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> value, <a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> min_value, <a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> max_value); 2262 </td> 2263 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2264 </td> 2265 </tr> 2266 <tr> 2267 <td><a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> clamp(<a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> value, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> min_value, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> max_value); 2268 </td> 2269 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2270 </td> 2271 </tr> 2272 <tr> 2273 <td><a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> clamp(<a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> value, <a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> min_value, <a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> max_value); 2274 </td> 2275 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2276 </td> 2277 </tr> 2278 <tr> 2279 <td><a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> clamp(<a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> value, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> min_value, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> max_value); 2280 </td> 2281 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2282 </td> 2283 </tr> 2284 <tr> 2285 <td><a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> clamp(<a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> value, <a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> min_value, <a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> max_value); 2286 </td> 2287 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2288 </td> 2289 </tr> 2290 <tr> 2291 <td><a href='rs_value_types.html#android_rs:ushort'>ushort</a> clamp(<a href='rs_value_types.html#android_rs:ushort'>ushort</a> value, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> min_value, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> max_value); 2292 </td> 2293 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2294 </td> 2295 </tr> 2296 <tr> 2297 <td><a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> clamp(<a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> value, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> min_value, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> max_value); 2298 </td> 2299 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2300 </td> 2301 </tr> 2302 <tr> 2303 <td><a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> clamp(<a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> value, <a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> min_value, <a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> max_value); 2304 </td> 2305 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2306 </td> 2307 </tr> 2308 <tr> 2309 <td><a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> clamp(<a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> value, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> min_value, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> max_value); 2310 </td> 2311 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2312 </td> 2313 </tr> 2314 <tr> 2315 <td><a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> clamp(<a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> value, <a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> min_value, <a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> max_value); 2316 </td> 2317 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2318 </td> 2319 </tr> 2320 <tr> 2321 <td><a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> clamp(<a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> value, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> min_value, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> max_value); 2322 </td> 2323 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2324 </td> 2325 </tr> 2326 <tr> 2327 <td><a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> clamp(<a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> value, <a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> min_value, <a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> max_value); 2328 </td> 2329 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 19</a> 2330 </td> 2331 </tr> 2332 </tbody></table> 2333 </div> 2334 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 2335 <table class='jd-tagtable'><tbody> 2336 <tr><th>value</th><td>Value to be clamped.</td></tr> 2337 <tr><th>min_value</th><td>Lower bound, a scalar or matching vector.</td></tr> 2338 <tr><th>max_value</th><td>High bound, must match the type of low.</td></tr> 2339 </tbody></table> 2340 </div> 2341 <div class='jd-tagdata jd-tagdescr'> 2342 <p> Clamps a value to a specified high and low bound. clamp() returns min_value 2343 if value < min_value, max_value if value > max_value, otherwise value. 2344 </p> 2345 2346 <p> There are two variants of clamp: one where the min and max are scalars applied 2347 to all entries of the value, the other where the min and max are also vectors. 2348 </p> 2349 2350 <p> If min_value is greater than max_value, the results are undefined. 2351 </p> 2352 </div> 2353 </div> 2354 2355 <a name='android_rs:clz'></a> 2356 <div class='jd-details'> 2357 <h4 class='jd-details-title'> 2358 <span class='sympad'>clz</span> 2359 <span class='normal'>: Number of leading 0 bits</span> 2360 </h4> 2361 <div class='jd-details-descr'> 2362 <table class='jd-tagtable'><tbody> 2363 <tr> 2364 <td>char clz(char value); 2365 </td> 2366 <td> </td> 2367 </tr> 2368 <tr> 2369 <td><a href='rs_value_types.html#android_rs:char2'>char2</a> clz(<a href='rs_value_types.html#android_rs:char2'>char2</a> value); 2370 </td> 2371 <td> </td> 2372 </tr> 2373 <tr> 2374 <td><a href='rs_value_types.html#android_rs:char3'>char3</a> clz(<a href='rs_value_types.html#android_rs:char3'>char3</a> value); 2375 </td> 2376 <td> </td> 2377 </tr> 2378 <tr> 2379 <td><a href='rs_value_types.html#android_rs:char4'>char4</a> clz(<a href='rs_value_types.html#android_rs:char4'>char4</a> value); 2380 </td> 2381 <td> </td> 2382 </tr> 2383 <tr> 2384 <td>int clz(int value); 2385 </td> 2386 <td> </td> 2387 </tr> 2388 <tr> 2389 <td><a href='rs_value_types.html#android_rs:int2'>int2</a> clz(<a href='rs_value_types.html#android_rs:int2'>int2</a> value); 2390 </td> 2391 <td> </td> 2392 </tr> 2393 <tr> 2394 <td><a href='rs_value_types.html#android_rs:int3'>int3</a> clz(<a href='rs_value_types.html#android_rs:int3'>int3</a> value); 2395 </td> 2396 <td> </td> 2397 </tr> 2398 <tr> 2399 <td><a href='rs_value_types.html#android_rs:int4'>int4</a> clz(<a href='rs_value_types.html#android_rs:int4'>int4</a> value); 2400 </td> 2401 <td> </td> 2402 </tr> 2403 <tr> 2404 <td>short clz(short value); 2405 </td> 2406 <td> </td> 2407 </tr> 2408 <tr> 2409 <td><a href='rs_value_types.html#android_rs:short2'>short2</a> clz(<a href='rs_value_types.html#android_rs:short2'>short2</a> value); 2410 </td> 2411 <td> </td> 2412 </tr> 2413 <tr> 2414 <td><a href='rs_value_types.html#android_rs:short3'>short3</a> clz(<a href='rs_value_types.html#android_rs:short3'>short3</a> value); 2415 </td> 2416 <td> </td> 2417 </tr> 2418 <tr> 2419 <td><a href='rs_value_types.html#android_rs:short4'>short4</a> clz(<a href='rs_value_types.html#android_rs:short4'>short4</a> value); 2420 </td> 2421 <td> </td> 2422 </tr> 2423 <tr> 2424 <td><a href='rs_value_types.html#android_rs:uchar'>uchar</a> clz(<a href='rs_value_types.html#android_rs:uchar'>uchar</a> value); 2425 </td> 2426 <td> </td> 2427 </tr> 2428 <tr> 2429 <td><a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> clz(<a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> value); 2430 </td> 2431 <td> </td> 2432 </tr> 2433 <tr> 2434 <td><a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> clz(<a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> value); 2435 </td> 2436 <td> </td> 2437 </tr> 2438 <tr> 2439 <td><a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> clz(<a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> value); 2440 </td> 2441 <td> </td> 2442 </tr> 2443 <tr> 2444 <td><a href='rs_value_types.html#android_rs:uint'>uint</a> clz(<a href='rs_value_types.html#android_rs:uint'>uint</a> value); 2445 </td> 2446 <td> </td> 2447 </tr> 2448 <tr> 2449 <td><a href='rs_value_types.html#android_rs:uint2'>uint2</a> clz(<a href='rs_value_types.html#android_rs:uint2'>uint2</a> value); 2450 </td> 2451 <td> </td> 2452 </tr> 2453 <tr> 2454 <td><a href='rs_value_types.html#android_rs:uint3'>uint3</a> clz(<a href='rs_value_types.html#android_rs:uint3'>uint3</a> value); 2455 </td> 2456 <td> </td> 2457 </tr> 2458 <tr> 2459 <td><a href='rs_value_types.html#android_rs:uint4'>uint4</a> clz(<a href='rs_value_types.html#android_rs:uint4'>uint4</a> value); 2460 </td> 2461 <td> </td> 2462 </tr> 2463 <tr> 2464 <td><a href='rs_value_types.html#android_rs:ushort'>ushort</a> clz(<a href='rs_value_types.html#android_rs:ushort'>ushort</a> value); 2465 </td> 2466 <td> </td> 2467 </tr> 2468 <tr> 2469 <td><a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> clz(<a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> value); 2470 </td> 2471 <td> </td> 2472 </tr> 2473 <tr> 2474 <td><a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> clz(<a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> value); 2475 </td> 2476 <td> </td> 2477 </tr> 2478 <tr> 2479 <td><a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> clz(<a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> value); 2480 </td> 2481 <td> </td> 2482 </tr> 2483 </tbody></table> 2484 </div> 2485 <div class='jd-tagdata jd-tagdescr'> 2486 <p> Returns the number of leading 0-bits in a value. 2487 </p> 2488 2489 <p> For example, <code>clz((char)0x03)</code> returns 6. 2490 </p> 2491 </div> 2492 </div> 2493 2494 <a name='android_rs:copysign'></a> 2495 <div class='jd-details'> 2496 <h4 class='jd-details-title'> 2497 <span class='sympad'>copysign</span> 2498 <span class='normal'>: Copies the sign of a number to another</span> 2499 </h4> 2500 <div class='jd-details-descr'> 2501 <table class='jd-tagtable'><tbody> 2502 <tr> 2503 <td>float copysign(float magnitude_value, float sign_value); 2504 </td> 2505 <td> </td> 2506 </tr> 2507 <tr> 2508 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> copysign(<a href='rs_value_types.html#android_rs:float2'>float2</a> magnitude_value, <a href='rs_value_types.html#android_rs:float2'>float2</a> sign_value); 2509 </td> 2510 <td> </td> 2511 </tr> 2512 <tr> 2513 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> copysign(<a href='rs_value_types.html#android_rs:float3'>float3</a> magnitude_value, <a href='rs_value_types.html#android_rs:float3'>float3</a> sign_value); 2514 </td> 2515 <td> </td> 2516 </tr> 2517 <tr> 2518 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> copysign(<a href='rs_value_types.html#android_rs:float4'>float4</a> magnitude_value, <a href='rs_value_types.html#android_rs:float4'>float4</a> sign_value); 2519 </td> 2520 <td> </td> 2521 </tr> 2522 </tbody></table> 2523 </div> 2524 <div class='jd-tagdata jd-tagdescr'> 2525 <p> Copies the sign from sign_value to magnitude_value. 2526 </p> 2527 2528 <p> The value returned is either magnitude_value or -magnitude_value. 2529 </p> 2530 2531 <p> For example, <code>copysign(4.0f, -2.7f)</code> returns -4.0f and <code>copysign(-4.0f, 2.7f)</code> returns 4.0f. 2532 </p> 2533 </div> 2534 </div> 2535 2536 <a name='android_rs:cos'></a> 2537 <div class='jd-details'> 2538 <h4 class='jd-details-title'> 2539 <span class='sympad'>cos</span> 2540 <span class='normal'>: Cosine</span> 2541 </h4> 2542 <div class='jd-details-descr'> 2543 <table class='jd-tagtable'><tbody> 2544 <tr> 2545 <td>float cos(float v); 2546 </td> 2547 <td> </td> 2548 </tr> 2549 <tr> 2550 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> cos(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2551 </td> 2552 <td> </td> 2553 </tr> 2554 <tr> 2555 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> cos(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2556 </td> 2557 <td> </td> 2558 </tr> 2559 <tr> 2560 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> cos(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2561 </td> 2562 <td> </td> 2563 </tr> 2564 </tbody></table> 2565 </div> 2566 <div class='jd-tagdata jd-tagdescr'> 2567 <p> Returns the cosine of an angle measured in radians. 2568 </p> 2569 2570 <p> See also <a href='rs_math.html#android_rs:native_cos'>native_cos</a>(). 2571 </p> 2572 </div> 2573 </div> 2574 2575 <a name='android_rs:cosh'></a> 2576 <div class='jd-details'> 2577 <h4 class='jd-details-title'> 2578 <span class='sympad'>cosh</span> 2579 <span class='normal'>: Hypebolic cosine</span> 2580 </h4> 2581 <div class='jd-details-descr'> 2582 <table class='jd-tagtable'><tbody> 2583 <tr> 2584 <td>float cosh(float v); 2585 </td> 2586 <td> </td> 2587 </tr> 2588 <tr> 2589 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> cosh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2590 </td> 2591 <td> </td> 2592 </tr> 2593 <tr> 2594 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> cosh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2595 </td> 2596 <td> </td> 2597 </tr> 2598 <tr> 2599 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> cosh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2600 </td> 2601 <td> </td> 2602 </tr> 2603 </tbody></table> 2604 </div> 2605 <div class='jd-tagdata jd-tagdescr'> 2606 <p> Returns the hypebolic cosine of v, where v is measured in radians. 2607 </p> 2608 2609 <p> See also <a href='rs_math.html#android_rs:native_cosh'>native_cosh</a>(). 2610 </p> 2611 </div> 2612 </div> 2613 2614 <a name='android_rs:cospi'></a> 2615 <div class='jd-details'> 2616 <h4 class='jd-details-title'> 2617 <span class='sympad'>cospi</span> 2618 <span class='normal'>: Cosine of a number multiplied by pi</span> 2619 </h4> 2620 <div class='jd-details-descr'> 2621 <table class='jd-tagtable'><tbody> 2622 <tr> 2623 <td>float cospi(float v); 2624 </td> 2625 <td> </td> 2626 </tr> 2627 <tr> 2628 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> cospi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2629 </td> 2630 <td> </td> 2631 </tr> 2632 <tr> 2633 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> cospi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2634 </td> 2635 <td> </td> 2636 </tr> 2637 <tr> 2638 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> cospi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2639 </td> 2640 <td> </td> 2641 </tr> 2642 </tbody></table> 2643 </div> 2644 <div class='jd-tagdata jd-tagdescr'> 2645 <p> Returns the cosine of <code>(v * pi)</code>, where <code>(v * pi)</code> is measured in radians. 2646 </p> 2647 2648 <p> To get the cosine of a value measured in degrees, call <code>cospi(v / 180.f)</code>. 2649 </p> 2650 2651 <p> See also <a href='rs_math.html#android_rs:native_cospi'>native_cospi</a>(). 2652 </p> 2653 </div> 2654 </div> 2655 2656 <a name='android_rs:degrees'></a> 2657 <div class='jd-details'> 2658 <h4 class='jd-details-title'> 2659 <span class='sympad'>degrees</span> 2660 <span class='normal'>: Converts radians into degrees</span> 2661 </h4> 2662 <div class='jd-details-descr'> 2663 <table class='jd-tagtable'><tbody> 2664 <tr> 2665 <td>float degrees(float v); 2666 </td> 2667 <td> </td> 2668 </tr> 2669 <tr> 2670 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> degrees(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2671 </td> 2672 <td> </td> 2673 </tr> 2674 <tr> 2675 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> degrees(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2676 </td> 2677 <td> </td> 2678 </tr> 2679 <tr> 2680 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> degrees(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2681 </td> 2682 <td> </td> 2683 </tr> 2684 </tbody></table> 2685 </div> 2686 <div class='jd-tagdata jd-tagdescr'> 2687 <p> Converts from radians to degrees. 2688 </p> 2689 </div> 2690 </div> 2691 2692 <a name='android_rs:erf'></a> 2693 <div class='jd-details'> 2694 <h4 class='jd-details-title'> 2695 <span class='sympad'>erf</span> 2696 <span class='normal'>: Mathematical error function</span> 2697 </h4> 2698 <div class='jd-details-descr'> 2699 <table class='jd-tagtable'><tbody> 2700 <tr> 2701 <td>float erf(float v); 2702 </td> 2703 <td> </td> 2704 </tr> 2705 <tr> 2706 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> erf(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2707 </td> 2708 <td> </td> 2709 </tr> 2710 <tr> 2711 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> erf(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2712 </td> 2713 <td> </td> 2714 </tr> 2715 <tr> 2716 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> erf(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2717 </td> 2718 <td> </td> 2719 </tr> 2720 </tbody></table> 2721 </div> 2722 <div class='jd-tagdata jd-tagdescr'> 2723 <p> Returns the error function. 2724 </p> 2725 </div> 2726 </div> 2727 2728 <a name='android_rs:erfc'></a> 2729 <div class='jd-details'> 2730 <h4 class='jd-details-title'> 2731 <span class='sympad'>erfc</span> 2732 <span class='normal'>: Mathematical complementary error function</span> 2733 </h4> 2734 <div class='jd-details-descr'> 2735 <table class='jd-tagtable'><tbody> 2736 <tr> 2737 <td>float erfc(float v); 2738 </td> 2739 <td> </td> 2740 </tr> 2741 <tr> 2742 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> erfc(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2743 </td> 2744 <td> </td> 2745 </tr> 2746 <tr> 2747 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> erfc(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2748 </td> 2749 <td> </td> 2750 </tr> 2751 <tr> 2752 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> erfc(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2753 </td> 2754 <td> </td> 2755 </tr> 2756 </tbody></table> 2757 </div> 2758 <div class='jd-tagdata jd-tagdescr'> 2759 <p> Returns the complementary error function. 2760 </p> 2761 </div> 2762 </div> 2763 2764 <a name='android_rs:exp'></a> 2765 <div class='jd-details'> 2766 <h4 class='jd-details-title'> 2767 <span class='sympad'>exp</span> 2768 <span class='normal'>: e raised to a number</span> 2769 </h4> 2770 <div class='jd-details-descr'> 2771 <table class='jd-tagtable'><tbody> 2772 <tr> 2773 <td>float exp(float v); 2774 </td> 2775 <td> </td> 2776 </tr> 2777 <tr> 2778 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> exp(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2779 </td> 2780 <td> </td> 2781 </tr> 2782 <tr> 2783 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> exp(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2784 </td> 2785 <td> </td> 2786 </tr> 2787 <tr> 2788 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> exp(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2789 </td> 2790 <td> </td> 2791 </tr> 2792 </tbody></table> 2793 </div> 2794 <div class='jd-tagdata jd-tagdescr'> 2795 <p> Returns e raised to v, i.e. e ^ v. 2796 </p> 2797 2798 <p> See also <a href='rs_math.html#android_rs:native_exp'>native_exp</a>(). 2799 </p> 2800 </div> 2801 </div> 2802 2803 <a name='android_rs:exp10'></a> 2804 <div class='jd-details'> 2805 <h4 class='jd-details-title'> 2806 <span class='sympad'>exp10</span> 2807 <span class='normal'>: 10 raised to a number</span> 2808 </h4> 2809 <div class='jd-details-descr'> 2810 <table class='jd-tagtable'><tbody> 2811 <tr> 2812 <td>float exp10(float v); 2813 </td> 2814 <td> </td> 2815 </tr> 2816 <tr> 2817 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> exp10(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2818 </td> 2819 <td> </td> 2820 </tr> 2821 <tr> 2822 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> exp10(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2823 </td> 2824 <td> </td> 2825 </tr> 2826 <tr> 2827 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> exp10(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2828 </td> 2829 <td> </td> 2830 </tr> 2831 </tbody></table> 2832 </div> 2833 <div class='jd-tagdata jd-tagdescr'> 2834 <p> Returns 10 raised to v, i.e. 10.f ^ v. 2835 </p> 2836 2837 <p> See also <a href='rs_math.html#android_rs:native_exp10'>native_exp10</a>(). 2838 </p> 2839 </div> 2840 </div> 2841 2842 <a name='android_rs:exp2'></a> 2843 <div class='jd-details'> 2844 <h4 class='jd-details-title'> 2845 <span class='sympad'>exp2</span> 2846 <span class='normal'>: 2 raised to a number</span> 2847 </h4> 2848 <div class='jd-details-descr'> 2849 <table class='jd-tagtable'><tbody> 2850 <tr> 2851 <td>float exp2(float v); 2852 </td> 2853 <td> </td> 2854 </tr> 2855 <tr> 2856 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> exp2(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2857 </td> 2858 <td> </td> 2859 </tr> 2860 <tr> 2861 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> exp2(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2862 </td> 2863 <td> </td> 2864 </tr> 2865 <tr> 2866 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> exp2(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2867 </td> 2868 <td> </td> 2869 </tr> 2870 </tbody></table> 2871 </div> 2872 <div class='jd-tagdata jd-tagdescr'> 2873 <p> Returns 2 raised to v, i.e. 2.f ^ v. 2874 </p> 2875 2876 <p> See also <a href='rs_math.html#android_rs:native_exp2'>native_exp2</a>(). 2877 </p> 2878 </div> 2879 </div> 2880 2881 <a name='android_rs:expm1'></a> 2882 <div class='jd-details'> 2883 <h4 class='jd-details-title'> 2884 <span class='sympad'>expm1</span> 2885 <span class='normal'>: e raised to a number minus one</span> 2886 </h4> 2887 <div class='jd-details-descr'> 2888 <table class='jd-tagtable'><tbody> 2889 <tr> 2890 <td>float expm1(float v); 2891 </td> 2892 <td> </td> 2893 </tr> 2894 <tr> 2895 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> expm1(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2896 </td> 2897 <td> </td> 2898 </tr> 2899 <tr> 2900 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> expm1(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2901 </td> 2902 <td> </td> 2903 </tr> 2904 <tr> 2905 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> expm1(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2906 </td> 2907 <td> </td> 2908 </tr> 2909 </tbody></table> 2910 </div> 2911 <div class='jd-tagdata jd-tagdescr'> 2912 <p> Returns e raised to v minus 1, i.e. (e ^ v) - 1. 2913 </p> 2914 2915 <p> See also <a href='rs_math.html#android_rs:native_expm1'>native_expm1</a>(). 2916 </p> 2917 </div> 2918 </div> 2919 2920 <a name='android_rs:fabs'></a> 2921 <div class='jd-details'> 2922 <h4 class='jd-details-title'> 2923 <span class='sympad'>fabs</span> 2924 <span class='normal'>: Absolute value of a float</span> 2925 </h4> 2926 <div class='jd-details-descr'> 2927 <table class='jd-tagtable'><tbody> 2928 <tr> 2929 <td>float fabs(float v); 2930 </td> 2931 <td> </td> 2932 </tr> 2933 <tr> 2934 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fabs(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 2935 </td> 2936 <td> </td> 2937 </tr> 2938 <tr> 2939 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fabs(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 2940 </td> 2941 <td> </td> 2942 </tr> 2943 <tr> 2944 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fabs(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 2945 </td> 2946 <td> </td> 2947 </tr> 2948 </tbody></table> 2949 </div> 2950 <div class='jd-tagdata jd-tagdescr'> 2951 <p> Returns the absolute value of the float v. 2952 </p> 2953 2954 <p> For integers, use <a href='rs_math.html#android_rs:abs'>abs</a>(). 2955 </p> 2956 </div> 2957 </div> 2958 2959 <a name='android_rs:fdim'></a> 2960 <div class='jd-details'> 2961 <h4 class='jd-details-title'> 2962 <span class='sympad'>fdim</span> 2963 <span class='normal'>: Positive difference between two values</span> 2964 </h4> 2965 <div class='jd-details-descr'> 2966 <table class='jd-tagtable'><tbody> 2967 <tr> 2968 <td>float fdim(float a, float b); 2969 </td> 2970 <td> </td> 2971 </tr> 2972 <tr> 2973 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fdim(<a href='rs_value_types.html#android_rs:float2'>float2</a> a, <a href='rs_value_types.html#android_rs:float2'>float2</a> b); 2974 </td> 2975 <td> </td> 2976 </tr> 2977 <tr> 2978 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fdim(<a href='rs_value_types.html#android_rs:float3'>float3</a> a, <a href='rs_value_types.html#android_rs:float3'>float3</a> b); 2979 </td> 2980 <td> </td> 2981 </tr> 2982 <tr> 2983 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fdim(<a href='rs_value_types.html#android_rs:float4'>float4</a> a, <a href='rs_value_types.html#android_rs:float4'>float4</a> b); 2984 </td> 2985 <td> </td> 2986 </tr> 2987 </tbody></table> 2988 </div> 2989 <div class='jd-tagdata jd-tagdescr'> 2990 <p> Returns the positive difference between two values. 2991 </p> 2992 2993 <p> If a > b, returns (a - b) otherwise returns 0f. 2994 </p> 2995 </div> 2996 </div> 2997 2998 <a name='android_rs:floor'></a> 2999 <div class='jd-details'> 3000 <h4 class='jd-details-title'> 3001 <span class='sympad'>floor</span> 3002 <span class='normal'>: Smallest integer not greater than a value</span> 3003 </h4> 3004 <div class='jd-details-descr'> 3005 <table class='jd-tagtable'><tbody> 3006 <tr> 3007 <td>float floor(float v); 3008 </td> 3009 <td> </td> 3010 </tr> 3011 <tr> 3012 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> floor(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3013 </td> 3014 <td> </td> 3015 </tr> 3016 <tr> 3017 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> floor(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3018 </td> 3019 <td> </td> 3020 </tr> 3021 <tr> 3022 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> floor(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3023 </td> 3024 <td> </td> 3025 </tr> 3026 </tbody></table> 3027 </div> 3028 <div class='jd-tagdata jd-tagdescr'> 3029 <p> Returns the smallest integer not greater than a value. 3030 </p> 3031 3032 <p> For example, <code>floor(1.2f)</code> returns 1.f, and <code>floor(-1.2f)</code> returns -2.f. 3033 </p> 3034 3035 <p> See also <a href='rs_math.html#android_rs:ceil'>ceil</a>(). 3036 </p> 3037 </div> 3038 </div> 3039 3040 <a name='android_rs:fma'></a> 3041 <div class='jd-details'> 3042 <h4 class='jd-details-title'> 3043 <span class='sympad'>fma</span> 3044 <span class='normal'>: Multiply and add</span> 3045 </h4> 3046 <div class='jd-details-descr'> 3047 <table class='jd-tagtable'><tbody> 3048 <tr> 3049 <td>float fma(float multiplicand1, float multiplicand2, float offset); 3050 </td> 3051 <td> </td> 3052 </tr> 3053 <tr> 3054 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fma(<a href='rs_value_types.html#android_rs:float2'>float2</a> multiplicand1, <a href='rs_value_types.html#android_rs:float2'>float2</a> multiplicand2, <a href='rs_value_types.html#android_rs:float2'>float2</a> offset); 3055 </td> 3056 <td> </td> 3057 </tr> 3058 <tr> 3059 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fma(<a href='rs_value_types.html#android_rs:float3'>float3</a> multiplicand1, <a href='rs_value_types.html#android_rs:float3'>float3</a> multiplicand2, <a href='rs_value_types.html#android_rs:float3'>float3</a> offset); 3060 </td> 3061 <td> </td> 3062 </tr> 3063 <tr> 3064 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fma(<a href='rs_value_types.html#android_rs:float4'>float4</a> multiplicand1, <a href='rs_value_types.html#android_rs:float4'>float4</a> multiplicand2, <a href='rs_value_types.html#android_rs:float4'>float4</a> offset); 3065 </td> 3066 <td> </td> 3067 </tr> 3068 </tbody></table> 3069 </div> 3070 <div class='jd-tagdata jd-tagdescr'> 3071 <p> Multiply and add. Returns <code>(multiplicand1 * multiplicand2) + offset</code>. 3072 </p> 3073 3074 <p> This function is similar to <a href='rs_math.html#android_rs:mad'>mad</a>(). fma() retains full precision of the multiplied result 3075 and rounds only after the addition. <a href='rs_math.html#android_rs:mad'>mad</a>() rounds after the multiplication and the addition. 3076 This extra precision is not guaranteed in rs_fp_relaxed mode. 3077 </p> 3078 </div> 3079 </div> 3080 3081 <a name='android_rs:fmax'></a> 3082 <div class='jd-details'> 3083 <h4 class='jd-details-title'> 3084 <span class='sympad'>fmax</span> 3085 <span class='normal'>: Maximum of two floats</span> 3086 </h4> 3087 <div class='jd-details-descr'> 3088 <table class='jd-tagtable'><tbody> 3089 <tr> 3090 <td>float fmax(float a, float b); 3091 </td> 3092 <td> </td> 3093 </tr> 3094 <tr> 3095 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fmax(<a href='rs_value_types.html#android_rs:float2'>float2</a> a, float b); 3096 </td> 3097 <td> </td> 3098 </tr> 3099 <tr> 3100 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fmax(<a href='rs_value_types.html#android_rs:float2'>float2</a> a, <a href='rs_value_types.html#android_rs:float2'>float2</a> b); 3101 </td> 3102 <td> </td> 3103 </tr> 3104 <tr> 3105 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fmax(<a href='rs_value_types.html#android_rs:float3'>float3</a> a, float b); 3106 </td> 3107 <td> </td> 3108 </tr> 3109 <tr> 3110 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fmax(<a href='rs_value_types.html#android_rs:float3'>float3</a> a, <a href='rs_value_types.html#android_rs:float3'>float3</a> b); 3111 </td> 3112 <td> </td> 3113 </tr> 3114 <tr> 3115 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fmax(<a href='rs_value_types.html#android_rs:float4'>float4</a> a, float b); 3116 </td> 3117 <td> </td> 3118 </tr> 3119 <tr> 3120 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fmax(<a href='rs_value_types.html#android_rs:float4'>float4</a> a, <a href='rs_value_types.html#android_rs:float4'>float4</a> b); 3121 </td> 3122 <td> </td> 3123 </tr> 3124 </tbody></table> 3125 </div> 3126 <div class='jd-tagdata jd-tagdescr'> 3127 <p> Returns the maximum of a and b, i.e. <code>(a < b ? b : a)</code>. 3128 </p> 3129 3130 <p> The <a href='rs_math.html#android_rs:max'>max</a>() function returns identical results but can be applied to more data types. 3131 </p> 3132 </div> 3133 </div> 3134 3135 <a name='android_rs:fmin'></a> 3136 <div class='jd-details'> 3137 <h4 class='jd-details-title'> 3138 <span class='sympad'>fmin</span> 3139 <span class='normal'>: Minimum of two floats</span> 3140 </h4> 3141 <div class='jd-details-descr'> 3142 <table class='jd-tagtable'><tbody> 3143 <tr> 3144 <td>float fmin(float a, float b); 3145 </td> 3146 <td> </td> 3147 </tr> 3148 <tr> 3149 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fmin(<a href='rs_value_types.html#android_rs:float2'>float2</a> a, float b); 3150 </td> 3151 <td> </td> 3152 </tr> 3153 <tr> 3154 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fmin(<a href='rs_value_types.html#android_rs:float2'>float2</a> a, <a href='rs_value_types.html#android_rs:float2'>float2</a> b); 3155 </td> 3156 <td> </td> 3157 </tr> 3158 <tr> 3159 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fmin(<a href='rs_value_types.html#android_rs:float3'>float3</a> a, float b); 3160 </td> 3161 <td> </td> 3162 </tr> 3163 <tr> 3164 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fmin(<a href='rs_value_types.html#android_rs:float3'>float3</a> a, <a href='rs_value_types.html#android_rs:float3'>float3</a> b); 3165 </td> 3166 <td> </td> 3167 </tr> 3168 <tr> 3169 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fmin(<a href='rs_value_types.html#android_rs:float4'>float4</a> a, float b); 3170 </td> 3171 <td> </td> 3172 </tr> 3173 <tr> 3174 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fmin(<a href='rs_value_types.html#android_rs:float4'>float4</a> a, <a href='rs_value_types.html#android_rs:float4'>float4</a> b); 3175 </td> 3176 <td> </td> 3177 </tr> 3178 </tbody></table> 3179 </div> 3180 <div class='jd-tagdata jd-tagdescr'> 3181 <p> Returns the minimum of a and b, i.e. <code>(a > b ? b : a)</code>. 3182 </p> 3183 3184 <p> The <a href='rs_math.html#android_rs:min'>min</a>() function returns identical results but can be applied to more data types. 3185 </p> 3186 </div> 3187 </div> 3188 3189 <a name='android_rs:fmod'></a> 3190 <div class='jd-details'> 3191 <h4 class='jd-details-title'> 3192 <span class='sympad'>fmod</span> 3193 <span class='normal'>: Modulo</span> 3194 </h4> 3195 <div class='jd-details-descr'> 3196 <table class='jd-tagtable'><tbody> 3197 <tr> 3198 <td>float fmod(float numerator, float denominator); 3199 </td> 3200 <td> </td> 3201 </tr> 3202 <tr> 3203 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fmod(<a href='rs_value_types.html#android_rs:float2'>float2</a> numerator, <a href='rs_value_types.html#android_rs:float2'>float2</a> denominator); 3204 </td> 3205 <td> </td> 3206 </tr> 3207 <tr> 3208 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fmod(<a href='rs_value_types.html#android_rs:float3'>float3</a> numerator, <a href='rs_value_types.html#android_rs:float3'>float3</a> denominator); 3209 </td> 3210 <td> </td> 3211 </tr> 3212 <tr> 3213 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fmod(<a href='rs_value_types.html#android_rs:float4'>float4</a> numerator, <a href='rs_value_types.html#android_rs:float4'>float4</a> denominator); 3214 </td> 3215 <td> </td> 3216 </tr> 3217 </tbody></table> 3218 </div> 3219 <div class='jd-tagdata jd-tagdescr'> 3220 <p> Returns the remainder of (numerator / denominator), where the quotient is rounded towards zero. 3221 </p> 3222 3223 <p> The function <a href='rs_math.html#android_rs:remainder'>remainder</a>() is similar but rounds toward the closest interger. 3224 For example, <code>fmod(-3.8f, 2.f)</code> returns -1.8f (-3.8f - -1.f * 2.f) 3225 while <code><a href='rs_math.html#android_rs:remainder'>remainder</a>(-3.8f, 2.f)</code> returns 0.2f (-3.8f - -2.f * 2.f). 3226 </p> 3227 </div> 3228 </div> 3229 3230 <a name='android_rs:fract'></a> 3231 <div class='jd-details'> 3232 <h4 class='jd-details-title'> 3233 <span class='sympad'>fract</span> 3234 <span class='normal'>: Positive fractional part</span> 3235 </h4> 3236 <div class='jd-details-descr'> 3237 <table class='jd-tagtable'><tbody> 3238 <tr> 3239 <td>float fract(float v); 3240 </td> 3241 <td> </td> 3242 </tr> 3243 <tr> 3244 <td>float fract(float v, float* floor); 3245 </td> 3246 <td> </td> 3247 </tr> 3248 <tr> 3249 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fract(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3250 </td> 3251 <td> </td> 3252 </tr> 3253 <tr> 3254 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> fract(<a href='rs_value_types.html#android_rs:float2'>float2</a> v, <a href='rs_value_types.html#android_rs:float2'>float2</a>* floor); 3255 </td> 3256 <td> </td> 3257 </tr> 3258 <tr> 3259 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fract(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3260 </td> 3261 <td> </td> 3262 </tr> 3263 <tr> 3264 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> fract(<a href='rs_value_types.html#android_rs:float3'>float3</a> v, <a href='rs_value_types.html#android_rs:float3'>float3</a>* floor); 3265 </td> 3266 <td> </td> 3267 </tr> 3268 <tr> 3269 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fract(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3270 </td> 3271 <td> </td> 3272 </tr> 3273 <tr> 3274 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> fract(<a href='rs_value_types.html#android_rs:float4'>float4</a> v, <a href='rs_value_types.html#android_rs:float4'>float4</a>* floor); 3275 </td> 3276 <td> </td> 3277 </tr> 3278 </tbody></table> 3279 </div> 3280 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 3281 <table class='jd-tagtable'><tbody> 3282 <tr><th>v</th><td>Input value.</td></tr> 3283 <tr><th>floor</th><td>If floor is not null, *floor will be set to the floor of v.</td></tr> 3284 </tbody></table> 3285 </div> 3286 <div class='jd-tagdata jd-tagdescr'> 3287 <p> Returns the positive fractional part of v, i.e. <code>v - floor(v)</code>. 3288 </p> 3289 3290 <p> For example, <code>fract(1.3f, &val)</code> returns 0.3f and sets val to 1.f. 3291 <code>fract(-1.3f, &val)</code> returns 0.7f and sets val to -2.f. 3292 </p> 3293 </div> 3294 </div> 3295 3296 <a name='android_rs:frexp'></a> 3297 <div class='jd-details'> 3298 <h4 class='jd-details-title'> 3299 <span class='sympad'>frexp</span> 3300 <span class='normal'>: Binary mantissa and exponent</span> 3301 </h4> 3302 <div class='jd-details-descr'> 3303 <table class='jd-tagtable'><tbody> 3304 <tr> 3305 <td>float frexp(float v, int* exponent); 3306 </td> 3307 <td> </td> 3308 </tr> 3309 <tr> 3310 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> frexp(<a href='rs_value_types.html#android_rs:float2'>float2</a> v, <a href='rs_value_types.html#android_rs:int2'>int2</a>* exponent); 3311 </td> 3312 <td> </td> 3313 </tr> 3314 <tr> 3315 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> frexp(<a href='rs_value_types.html#android_rs:float3'>float3</a> v, <a href='rs_value_types.html#android_rs:int3'>int3</a>* exponent); 3316 </td> 3317 <td> </td> 3318 </tr> 3319 <tr> 3320 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> frexp(<a href='rs_value_types.html#android_rs:float4'>float4</a> v, <a href='rs_value_types.html#android_rs:int4'>int4</a>* exponent); 3321 </td> 3322 <td> </td> 3323 </tr> 3324 </tbody></table> 3325 </div> 3326 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 3327 <table class='jd-tagtable'><tbody> 3328 <tr><th>v</th><td>Input value.</td></tr> 3329 <tr><th>exponent</th><td>If exponent is not null, *exponent will be set to the exponent of v.</td></tr> 3330 </tbody></table> 3331 </div> 3332 <div class='jd-tagdata jd-tagdescr'> 3333 <p> Returns the binary mantissa and exponent of v, i.e. <code>v == mantissa * 2 ^ exponent</code>. 3334 </p> 3335 3336 <p> The mantissa is always between 0.5 (inclusive) and 1.0 (exclusive). 3337 </p> 3338 3339 <p> See <a href='rs_math.html#android_rs:ldexp'>ldexp</a>() for the reverse operation. See also <a href='rs_math.html#android_rs:logb'>logb</a>() and <a href='rs_math.html#android_rs:ilogb'>ilogb</a>(). 3340 </p> 3341 </div> 3342 </div> 3343 3344 <a name='android_rs:half_recip'></a> 3345 <div class='jd-details'> 3346 <h4 class='jd-details-title'> 3347 <span class='sympad'>half_recip</span> 3348 <span class='normal'>: Reciprocal computed to 16 bit precision</span> 3349 </h4> 3350 <div class='jd-details-descr'> 3351 <table class='jd-tagtable'><tbody> 3352 <tr> 3353 <td>float half_recip(float v); 3354 </td> 3355 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3356 </td> 3357 </tr> 3358 <tr> 3359 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> half_recip(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3360 </td> 3361 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3362 </td> 3363 </tr> 3364 <tr> 3365 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> half_recip(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3366 </td> 3367 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3368 </td> 3369 </tr> 3370 <tr> 3371 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> half_recip(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3372 </td> 3373 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3374 </td> 3375 </tr> 3376 </tbody></table> 3377 </div> 3378 <div class='jd-tagdata jd-tagdescr'> 3379 <p> Returns the approximate reciprocal of a value. 3380 </p> 3381 3382 <p> The precision is that of a 16 bit floating point value. 3383 </p> 3384 3385 <p> See also <a href='rs_math.html#android_rs:native_recip'>native_recip</a>(). 3386 </p> 3387 </div> 3388 </div> 3389 3390 <a name='android_rs:half_rsqrt'></a> 3391 <div class='jd-details'> 3392 <h4 class='jd-details-title'> 3393 <span class='sympad'>half_rsqrt</span> 3394 <span class='normal'>: Reciprocal of a square root computed to 16 bit precision</span> 3395 </h4> 3396 <div class='jd-details-descr'> 3397 <table class='jd-tagtable'><tbody> 3398 <tr> 3399 <td>float half_rsqrt(float v); 3400 </td> 3401 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3402 </td> 3403 </tr> 3404 <tr> 3405 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> half_rsqrt(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3406 </td> 3407 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3408 </td> 3409 </tr> 3410 <tr> 3411 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> half_rsqrt(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3412 </td> 3413 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3414 </td> 3415 </tr> 3416 <tr> 3417 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> half_rsqrt(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3418 </td> 3419 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3420 </td> 3421 </tr> 3422 </tbody></table> 3423 </div> 3424 <div class='jd-tagdata jd-tagdescr'> 3425 <p> Returns the approximate value of <code>(1.f / sqrt(value))</code>. 3426 </p> 3427 3428 <p> The precision is that of a 16 bit floating point value. 3429 </p> 3430 3431 <p> See also <a href='rs_math.html#android_rs:rsqrt'>rsqrt</a>(), <a href='rs_math.html#android_rs:native_rsqrt'>native_rsqrt</a>(). 3432 </p> 3433 </div> 3434 </div> 3435 3436 <a name='android_rs:half_sqrt'></a> 3437 <div class='jd-details'> 3438 <h4 class='jd-details-title'> 3439 <span class='sympad'>half_sqrt</span> 3440 <span class='normal'>: Square root computed to 16 bit precision</span> 3441 </h4> 3442 <div class='jd-details-descr'> 3443 <table class='jd-tagtable'><tbody> 3444 <tr> 3445 <td>float half_sqrt(float v); 3446 </td> 3447 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3448 </td> 3449 </tr> 3450 <tr> 3451 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> half_sqrt(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3452 </td> 3453 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3454 </td> 3455 </tr> 3456 <tr> 3457 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> half_sqrt(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3458 </td> 3459 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3460 </td> 3461 </tr> 3462 <tr> 3463 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> half_sqrt(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3464 </td> 3465 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 17</a> 3466 </td> 3467 </tr> 3468 </tbody></table> 3469 </div> 3470 <div class='jd-tagdata jd-tagdescr'> 3471 <p> Returns the approximate square root of a value. 3472 </p> 3473 3474 <p> The precision is that of a 16 bit floating point value. 3475 </p> 3476 3477 <p> See also <a href='rs_math.html#android_rs:sqrt'>sqrt</a>(), <a href='rs_math.html#android_rs:native_sqrt'>native_sqrt</a>(). 3478 </p> 3479 </div> 3480 </div> 3481 3482 <a name='android_rs:hypot'></a> 3483 <div class='jd-details'> 3484 <h4 class='jd-details-title'> 3485 <span class='sympad'>hypot</span> 3486 <span class='normal'>: Hypotenuse</span> 3487 </h4> 3488 <div class='jd-details-descr'> 3489 <table class='jd-tagtable'><tbody> 3490 <tr> 3491 <td>float hypot(float a, float b); 3492 </td> 3493 <td> </td> 3494 </tr> 3495 <tr> 3496 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> hypot(<a href='rs_value_types.html#android_rs:float2'>float2</a> a, <a href='rs_value_types.html#android_rs:float2'>float2</a> b); 3497 </td> 3498 <td> </td> 3499 </tr> 3500 <tr> 3501 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> hypot(<a href='rs_value_types.html#android_rs:float3'>float3</a> a, <a href='rs_value_types.html#android_rs:float3'>float3</a> b); 3502 </td> 3503 <td> </td> 3504 </tr> 3505 <tr> 3506 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> hypot(<a href='rs_value_types.html#android_rs:float4'>float4</a> a, <a href='rs_value_types.html#android_rs:float4'>float4</a> b); 3507 </td> 3508 <td> </td> 3509 </tr> 3510 </tbody></table> 3511 </div> 3512 <div class='jd-tagdata jd-tagdescr'> 3513 <p> Returns the hypotenuse, i.e. <code>sqrt(a * a + b * b)</code>. 3514 </p> 3515 3516 <p> See also <a href='rs_math.html#android_rs:native_hypot'>native_hypot</a>(). 3517 </p> 3518 </div> 3519 </div> 3520 3521 <a name='android_rs:ilogb'></a> 3522 <div class='jd-details'> 3523 <h4 class='jd-details-title'> 3524 <span class='sympad'>ilogb</span> 3525 <span class='normal'>: Base two exponent</span> 3526 </h4> 3527 <div class='jd-details-descr'> 3528 <table class='jd-tagtable'><tbody> 3529 <tr> 3530 <td>int ilogb(float v); 3531 </td> 3532 <td> </td> 3533 </tr> 3534 <tr> 3535 <td><a href='rs_value_types.html#android_rs:int2'>int2</a> ilogb(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3536 </td> 3537 <td> </td> 3538 </tr> 3539 <tr> 3540 <td><a href='rs_value_types.html#android_rs:int3'>int3</a> ilogb(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3541 </td> 3542 <td> </td> 3543 </tr> 3544 <tr> 3545 <td><a href='rs_value_types.html#android_rs:int4'>int4</a> ilogb(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3546 </td> 3547 <td> </td> 3548 </tr> 3549 </tbody></table> 3550 </div> 3551 <div class='jd-tagdata jd-tagdescr'> 3552 <p> Returns the base two exponent of a value, where the mantissa is between 3553 1.f (inclusive) and 2.f (exclusive). 3554 </p> 3555 3556 <p> For example, <code>ilogb(8.5f)</code> returns 3. 3557 </p> 3558 3559 <p> Because of the difference in mantissa, this number is one less than is returned by <a href='rs_math.html#android_rs:frexp'>frexp</a>(). 3560 </p> 3561 3562 <p> <a href='rs_math.html#android_rs:logb'>logb</a>() is similar but returns a float. 3563 </p> 3564 </div> 3565 </div> 3566 3567 <a name='android_rs:ldexp'></a> 3568 <div class='jd-details'> 3569 <h4 class='jd-details-title'> 3570 <span class='sympad'>ldexp</span> 3571 <span class='normal'>: Creates a floating point from mantissa and exponent</span> 3572 </h4> 3573 <div class='jd-details-descr'> 3574 <table class='jd-tagtable'><tbody> 3575 <tr> 3576 <td>float ldexp(float mantissa, int exponent); 3577 </td> 3578 <td> </td> 3579 </tr> 3580 <tr> 3581 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> ldexp(<a href='rs_value_types.html#android_rs:float2'>float2</a> mantissa, int exponent); 3582 </td> 3583 <td> </td> 3584 </tr> 3585 <tr> 3586 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> ldexp(<a href='rs_value_types.html#android_rs:float2'>float2</a> mantissa, <a href='rs_value_types.html#android_rs:int2'>int2</a> exponent); 3587 </td> 3588 <td> </td> 3589 </tr> 3590 <tr> 3591 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> ldexp(<a href='rs_value_types.html#android_rs:float3'>float3</a> mantissa, int exponent); 3592 </td> 3593 <td> </td> 3594 </tr> 3595 <tr> 3596 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> ldexp(<a href='rs_value_types.html#android_rs:float3'>float3</a> mantissa, <a href='rs_value_types.html#android_rs:int3'>int3</a> exponent); 3597 </td> 3598 <td> </td> 3599 </tr> 3600 <tr> 3601 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> ldexp(<a href='rs_value_types.html#android_rs:float4'>float4</a> mantissa, int exponent); 3602 </td> 3603 <td> </td> 3604 </tr> 3605 <tr> 3606 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> ldexp(<a href='rs_value_types.html#android_rs:float4'>float4</a> mantissa, <a href='rs_value_types.html#android_rs:int4'>int4</a> exponent); 3607 </td> 3608 <td> </td> 3609 </tr> 3610 </tbody></table> 3611 </div> 3612 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 3613 <table class='jd-tagtable'><tbody> 3614 <tr><th>mantissa</th><td>Mantissa.</td></tr> 3615 <tr><th>exponent</th><td>Exponent, a single component or matching vector.</td></tr> 3616 </tbody></table> 3617 </div> 3618 <div class='jd-tagdata jd-tagdescr'> 3619 <p> Returns the floating point created from the mantissa and exponent, 3620 i.e. (mantissa * 2 ^ exponent). 3621 </p> 3622 3623 <p> See <a href='rs_math.html#android_rs:frexp'>frexp</a>() for the reverse operation. 3624 </p> 3625 </div> 3626 </div> 3627 3628 <a name='android_rs:lgamma'></a> 3629 <div class='jd-details'> 3630 <h4 class='jd-details-title'> 3631 <span class='sympad'>lgamma</span> 3632 <span class='normal'>: Natural logarithm of the gamma function</span> 3633 </h4> 3634 <div class='jd-details-descr'> 3635 <table class='jd-tagtable'><tbody> 3636 <tr> 3637 <td>float lgamma(float v); 3638 </td> 3639 <td> </td> 3640 </tr> 3641 <tr> 3642 <td>float lgamma(float v, int* sign_of_gamma); 3643 </td> 3644 <td> </td> 3645 </tr> 3646 <tr> 3647 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> lgamma(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3648 </td> 3649 <td> </td> 3650 </tr> 3651 <tr> 3652 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> lgamma(<a href='rs_value_types.html#android_rs:float2'>float2</a> v, <a href='rs_value_types.html#android_rs:int2'>int2</a>* sign_of_gamma); 3653 </td> 3654 <td> </td> 3655 </tr> 3656 <tr> 3657 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> lgamma(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3658 </td> 3659 <td> </td> 3660 </tr> 3661 <tr> 3662 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> lgamma(<a href='rs_value_types.html#android_rs:float3'>float3</a> v, <a href='rs_value_types.html#android_rs:int3'>int3</a>* sign_of_gamma); 3663 </td> 3664 <td> </td> 3665 </tr> 3666 <tr> 3667 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> lgamma(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3668 </td> 3669 <td> </td> 3670 </tr> 3671 <tr> 3672 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> lgamma(<a href='rs_value_types.html#android_rs:float4'>float4</a> v, <a href='rs_value_types.html#android_rs:int4'>int4</a>* sign_of_gamma); 3673 </td> 3674 <td> </td> 3675 </tr> 3676 </tbody></table> 3677 </div> 3678 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 3679 <table class='jd-tagtable'><tbody> 3680 <tr><th>v</th><td></td></tr> 3681 <tr><th>sign_of_gamma</th><td>If sign_of_gamma is not null, *sign_of_gamma will be set to -1.f if the gamma of v is negative, otherwise to 1.f.</td></tr> 3682 </tbody></table> 3683 </div> 3684 <div class='jd-tagdata jd-tagdescr'> 3685 <p> Returns the natural logarithm of the absolute value of the gamma function, 3686 i.e. <code><a href='rs_math.html#android_rs:log'>log</a>(<a href='rs_math.html#android_rs:fabs'>fabs</a>(<a href='rs_math.html#android_rs:tgamma'>tgamma</a>(v)))</code>. 3687 </p> 3688 3689 <p> See also <a href='rs_math.html#android_rs:tgamma'>tgamma</a>(). 3690 </p> 3691 </div> 3692 </div> 3693 3694 <a name='android_rs:log'></a> 3695 <div class='jd-details'> 3696 <h4 class='jd-details-title'> 3697 <span class='sympad'>log</span> 3698 <span class='normal'>: Natural logarithm</span> 3699 </h4> 3700 <div class='jd-details-descr'> 3701 <table class='jd-tagtable'><tbody> 3702 <tr> 3703 <td>float log(float v); 3704 </td> 3705 <td> </td> 3706 </tr> 3707 <tr> 3708 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> log(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3709 </td> 3710 <td> </td> 3711 </tr> 3712 <tr> 3713 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> log(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3714 </td> 3715 <td> </td> 3716 </tr> 3717 <tr> 3718 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> log(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3719 </td> 3720 <td> </td> 3721 </tr> 3722 </tbody></table> 3723 </div> 3724 <div class='jd-tagdata jd-tagdescr'> 3725 <p> Returns the natural logarithm. 3726 </p> 3727 3728 <p> See also <a href='rs_math.html#android_rs:native_log'>native_log</a>(). 3729 </p> 3730 </div> 3731 </div> 3732 3733 <a name='android_rs:log10'></a> 3734 <div class='jd-details'> 3735 <h4 class='jd-details-title'> 3736 <span class='sympad'>log10</span> 3737 <span class='normal'>: Base 10 logarithm</span> 3738 </h4> 3739 <div class='jd-details-descr'> 3740 <table class='jd-tagtable'><tbody> 3741 <tr> 3742 <td>float log10(float v); 3743 </td> 3744 <td> </td> 3745 </tr> 3746 <tr> 3747 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> log10(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3748 </td> 3749 <td> </td> 3750 </tr> 3751 <tr> 3752 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> log10(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3753 </td> 3754 <td> </td> 3755 </tr> 3756 <tr> 3757 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> log10(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3758 </td> 3759 <td> </td> 3760 </tr> 3761 </tbody></table> 3762 </div> 3763 <div class='jd-tagdata jd-tagdescr'> 3764 <p> Returns the base 10 logarithm. 3765 </p> 3766 3767 <p> See also <a href='rs_math.html#android_rs:native_log10'>native_log10</a>(). 3768 </p> 3769 </div> 3770 </div> 3771 3772 <a name='android_rs:log1p'></a> 3773 <div class='jd-details'> 3774 <h4 class='jd-details-title'> 3775 <span class='sympad'>log1p</span> 3776 <span class='normal'>: Natural logarithm of a value plus 1</span> 3777 </h4> 3778 <div class='jd-details-descr'> 3779 <table class='jd-tagtable'><tbody> 3780 <tr> 3781 <td>float log1p(float v); 3782 </td> 3783 <td> </td> 3784 </tr> 3785 <tr> 3786 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> log1p(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3787 </td> 3788 <td> </td> 3789 </tr> 3790 <tr> 3791 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> log1p(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3792 </td> 3793 <td> </td> 3794 </tr> 3795 <tr> 3796 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> log1p(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3797 </td> 3798 <td> </td> 3799 </tr> 3800 </tbody></table> 3801 </div> 3802 <div class='jd-tagdata jd-tagdescr'> 3803 <p> Returns the natural logarithm of <code>(v + 1.f)</code>. 3804 </p> 3805 3806 <p> See also <a href='rs_math.html#android_rs:native_log1p'>native_log1p</a>(). 3807 </p> 3808 </div> 3809 </div> 3810 3811 <a name='android_rs:log2'></a> 3812 <div class='jd-details'> 3813 <h4 class='jd-details-title'> 3814 <span class='sympad'>log2</span> 3815 <span class='normal'>: Base 2 logarithm</span> 3816 </h4> 3817 <div class='jd-details-descr'> 3818 <table class='jd-tagtable'><tbody> 3819 <tr> 3820 <td>float log2(float v); 3821 </td> 3822 <td> </td> 3823 </tr> 3824 <tr> 3825 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> log2(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3826 </td> 3827 <td> </td> 3828 </tr> 3829 <tr> 3830 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> log2(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3831 </td> 3832 <td> </td> 3833 </tr> 3834 <tr> 3835 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> log2(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3836 </td> 3837 <td> </td> 3838 </tr> 3839 </tbody></table> 3840 </div> 3841 <div class='jd-tagdata jd-tagdescr'> 3842 <p> Returns the base 2 logarithm. 3843 </p> 3844 3845 <p> See also <a href='rs_math.html#android_rs:native_log2'>native_log2</a>(). 3846 </p> 3847 </div> 3848 </div> 3849 3850 <a name='android_rs:logb'></a> 3851 <div class='jd-details'> 3852 <h4 class='jd-details-title'> 3853 <span class='sympad'>logb</span> 3854 <span class='normal'>: Base two exponent</span> 3855 </h4> 3856 <div class='jd-details-descr'> 3857 <table class='jd-tagtable'><tbody> 3858 <tr> 3859 <td>float logb(float v); 3860 </td> 3861 <td> </td> 3862 </tr> 3863 <tr> 3864 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> logb(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 3865 </td> 3866 <td> </td> 3867 </tr> 3868 <tr> 3869 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> logb(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 3870 </td> 3871 <td> </td> 3872 </tr> 3873 <tr> 3874 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> logb(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 3875 </td> 3876 <td> </td> 3877 </tr> 3878 </tbody></table> 3879 </div> 3880 <div class='jd-tagdata jd-tagdescr'> 3881 <p> Returns the base two exponent of a value, where the mantissa is between 3882 1.f (inclusive) and 2.f (exclusive). 3883 </p> 3884 3885 <p> For example, <code>logb(8.5f)</code> returns 3.f. 3886 </p> 3887 3888 <p> Because of the difference in mantissa, this number is one less than is returned by frexp(). 3889 </p> 3890 3891 <p> <a href='rs_math.html#android_rs:ilogb'>ilogb</a>() is similar but returns an integer. 3892 </p> 3893 </div> 3894 </div> 3895 3896 <a name='android_rs:mad'></a> 3897 <div class='jd-details'> 3898 <h4 class='jd-details-title'> 3899 <span class='sympad'>mad</span> 3900 <span class='normal'>: Multiply and add</span> 3901 </h4> 3902 <div class='jd-details-descr'> 3903 <table class='jd-tagtable'><tbody> 3904 <tr> 3905 <td>float mad(float multiplicand1, float multiplicand2, float offset); 3906 </td> 3907 <td> </td> 3908 </tr> 3909 <tr> 3910 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> mad(<a href='rs_value_types.html#android_rs:float2'>float2</a> multiplicand1, <a href='rs_value_types.html#android_rs:float2'>float2</a> multiplicand2, <a href='rs_value_types.html#android_rs:float2'>float2</a> offset); 3911 </td> 3912 <td> </td> 3913 </tr> 3914 <tr> 3915 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> mad(<a href='rs_value_types.html#android_rs:float3'>float3</a> multiplicand1, <a href='rs_value_types.html#android_rs:float3'>float3</a> multiplicand2, <a href='rs_value_types.html#android_rs:float3'>float3</a> offset); 3916 </td> 3917 <td> </td> 3918 </tr> 3919 <tr> 3920 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> mad(<a href='rs_value_types.html#android_rs:float4'>float4</a> multiplicand1, <a href='rs_value_types.html#android_rs:float4'>float4</a> multiplicand2, <a href='rs_value_types.html#android_rs:float4'>float4</a> offset); 3921 </td> 3922 <td> </td> 3923 </tr> 3924 </tbody></table> 3925 </div> 3926 <div class='jd-tagdata jd-tagdescr'> 3927 <p> Multiply and add. Returns <code>(multiplicand1 * multiplicand2) + offset</code>. 3928 </p> 3929 3930 <p> This function is similar to <a href='rs_math.html#android_rs:fma'>fma</a>(). <a href='rs_math.html#android_rs:fma'>fma</a>() retains full precision of the multiplied result 3931 and rounds only after the addition. mad() rounds after the multiplication and the addition. 3932 In rs_fp_relaxed mode, mad() may not do the rounding after multiplicaiton. 3933 </p> 3934 </div> 3935 </div> 3936 3937 <a name='android_rs:max'></a> 3938 <div class='jd-details'> 3939 <h4 class='jd-details-title'> 3940 <span class='sympad'>max</span> 3941 <span class='normal'>: Maximum</span> 3942 </h4> 3943 <div class='jd-details-descr'> 3944 <table class='jd-tagtable'><tbody> 3945 <tr> 3946 <td>char max(char a, char b); 3947 </td> 3948 <td> </td> 3949 </tr> 3950 <tr> 3951 <td><a href='rs_value_types.html#android_rs:char2'>char2</a> max(<a href='rs_value_types.html#android_rs:char2'>char2</a> a, <a href='rs_value_types.html#android_rs:char2'>char2</a> b); 3952 </td> 3953 <td> </td> 3954 </tr> 3955 <tr> 3956 <td><a href='rs_value_types.html#android_rs:char3'>char3</a> max(<a href='rs_value_types.html#android_rs:char3'>char3</a> a, <a href='rs_value_types.html#android_rs:char3'>char3</a> b); 3957 </td> 3958 <td> </td> 3959 </tr> 3960 <tr> 3961 <td><a href='rs_value_types.html#android_rs:char4'>char4</a> max(<a href='rs_value_types.html#android_rs:char4'>char4</a> a, <a href='rs_value_types.html#android_rs:char4'>char4</a> b); 3962 </td> 3963 <td> </td> 3964 </tr> 3965 <tr> 3966 <td>float max(float a, float b); 3967 </td> 3968 <td> </td> 3969 </tr> 3970 <tr> 3971 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> max(<a href='rs_value_types.html#android_rs:float2'>float2</a> a, <a href='rs_value_types.html#android_rs:float2'>float2</a> b); 3972 </td> 3973 <td> </td> 3974 </tr> 3975 <tr> 3976 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> max(<a href='rs_value_types.html#android_rs:float3'>float3</a> a, <a href='rs_value_types.html#android_rs:float3'>float3</a> b); 3977 </td> 3978 <td> </td> 3979 </tr> 3980 <tr> 3981 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> max(<a href='rs_value_types.html#android_rs:float4'>float4</a> a, <a href='rs_value_types.html#android_rs:float4'>float4</a> b); 3982 </td> 3983 <td> </td> 3984 </tr> 3985 <tr> 3986 <td>int max(int a, int b); 3987 </td> 3988 <td> </td> 3989 </tr> 3990 <tr> 3991 <td><a href='rs_value_types.html#android_rs:int2'>int2</a> max(<a href='rs_value_types.html#android_rs:int2'>int2</a> a, <a href='rs_value_types.html#android_rs:int2'>int2</a> b); 3992 </td> 3993 <td> </td> 3994 </tr> 3995 <tr> 3996 <td><a href='rs_value_types.html#android_rs:int3'>int3</a> max(<a href='rs_value_types.html#android_rs:int3'>int3</a> a, <a href='rs_value_types.html#android_rs:int3'>int3</a> b); 3997 </td> 3998 <td> </td> 3999 </tr> 4000 <tr> 4001 <td><a href='rs_value_types.html#android_rs:int4'>int4</a> max(<a href='rs_value_types.html#android_rs:int4'>int4</a> a, <a href='rs_value_types.html#android_rs:int4'>int4</a> b); 4002 </td> 4003 <td> </td> 4004 </tr> 4005 <tr> 4006 <td>long max(long a, long b); 4007 </td> 4008 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4009 </td> 4010 </tr> 4011 <tr> 4012 <td><a href='rs_value_types.html#android_rs:long2'>long2</a> max(<a href='rs_value_types.html#android_rs:long2'>long2</a> a, <a href='rs_value_types.html#android_rs:long2'>long2</a> b); 4013 </td> 4014 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4015 </td> 4016 </tr> 4017 <tr> 4018 <td><a href='rs_value_types.html#android_rs:long3'>long3</a> max(<a href='rs_value_types.html#android_rs:long3'>long3</a> a, <a href='rs_value_types.html#android_rs:long3'>long3</a> b); 4019 </td> 4020 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4021 </td> 4022 </tr> 4023 <tr> 4024 <td><a href='rs_value_types.html#android_rs:long4'>long4</a> max(<a href='rs_value_types.html#android_rs:long4'>long4</a> a, <a href='rs_value_types.html#android_rs:long4'>long4</a> b); 4025 </td> 4026 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4027 </td> 4028 </tr> 4029 <tr> 4030 <td>short max(short a, short b); 4031 </td> 4032 <td> </td> 4033 </tr> 4034 <tr> 4035 <td><a href='rs_value_types.html#android_rs:short2'>short2</a> max(<a href='rs_value_types.html#android_rs:short2'>short2</a> a, <a href='rs_value_types.html#android_rs:short2'>short2</a> b); 4036 </td> 4037 <td> </td> 4038 </tr> 4039 <tr> 4040 <td><a href='rs_value_types.html#android_rs:short3'>short3</a> max(<a href='rs_value_types.html#android_rs:short3'>short3</a> a, <a href='rs_value_types.html#android_rs:short3'>short3</a> b); 4041 </td> 4042 <td> </td> 4043 </tr> 4044 <tr> 4045 <td><a href='rs_value_types.html#android_rs:short4'>short4</a> max(<a href='rs_value_types.html#android_rs:short4'>short4</a> a, <a href='rs_value_types.html#android_rs:short4'>short4</a> b); 4046 </td> 4047 <td> </td> 4048 </tr> 4049 <tr> 4050 <td><a href='rs_value_types.html#android_rs:uchar'>uchar</a> max(<a href='rs_value_types.html#android_rs:uchar'>uchar</a> a, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> b); 4051 </td> 4052 <td> </td> 4053 </tr> 4054 <tr> 4055 <td><a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> max(<a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> a, <a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> b); 4056 </td> 4057 <td> </td> 4058 </tr> 4059 <tr> 4060 <td><a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> max(<a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> a, <a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> b); 4061 </td> 4062 <td> </td> 4063 </tr> 4064 <tr> 4065 <td><a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> max(<a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> a, <a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> b); 4066 </td> 4067 <td> </td> 4068 </tr> 4069 <tr> 4070 <td><a href='rs_value_types.html#android_rs:uint'>uint</a> max(<a href='rs_value_types.html#android_rs:uint'>uint</a> a, <a href='rs_value_types.html#android_rs:uint'>uint</a> b); 4071 </td> 4072 <td> </td> 4073 </tr> 4074 <tr> 4075 <td><a href='rs_value_types.html#android_rs:uint2'>uint2</a> max(<a href='rs_value_types.html#android_rs:uint2'>uint2</a> a, <a href='rs_value_types.html#android_rs:uint2'>uint2</a> b); 4076 </td> 4077 <td> </td> 4078 </tr> 4079 <tr> 4080 <td><a href='rs_value_types.html#android_rs:uint3'>uint3</a> max(<a href='rs_value_types.html#android_rs:uint3'>uint3</a> a, <a href='rs_value_types.html#android_rs:uint3'>uint3</a> b); 4081 </td> 4082 <td> </td> 4083 </tr> 4084 <tr> 4085 <td><a href='rs_value_types.html#android_rs:uint4'>uint4</a> max(<a href='rs_value_types.html#android_rs:uint4'>uint4</a> a, <a href='rs_value_types.html#android_rs:uint4'>uint4</a> b); 4086 </td> 4087 <td> </td> 4088 </tr> 4089 <tr> 4090 <td><a href='rs_value_types.html#android_rs:ulong'>ulong</a> max(<a href='rs_value_types.html#android_rs:ulong'>ulong</a> a, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> b); 4091 </td> 4092 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4093 </td> 4094 </tr> 4095 <tr> 4096 <td><a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> max(<a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> a, <a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> b); 4097 </td> 4098 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4099 </td> 4100 </tr> 4101 <tr> 4102 <td><a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> max(<a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> a, <a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> b); 4103 </td> 4104 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4105 </td> 4106 </tr> 4107 <tr> 4108 <td><a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> max(<a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> a, <a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> b); 4109 </td> 4110 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4111 </td> 4112 </tr> 4113 <tr> 4114 <td><a href='rs_value_types.html#android_rs:ushort'>ushort</a> max(<a href='rs_value_types.html#android_rs:ushort'>ushort</a> a, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> b); 4115 </td> 4116 <td> </td> 4117 </tr> 4118 <tr> 4119 <td><a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> max(<a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> a, <a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> b); 4120 </td> 4121 <td> </td> 4122 </tr> 4123 <tr> 4124 <td><a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> max(<a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> a, <a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> b); 4125 </td> 4126 <td> </td> 4127 </tr> 4128 <tr> 4129 <td><a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> max(<a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> a, <a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> b); 4130 </td> 4131 <td> </td> 4132 </tr> 4133 </tbody></table> 4134 </div> 4135 <div class='jd-tagdata jd-tagdescr'> 4136 <p> Returns the maximum value of two arguments. 4137 </p> 4138 </div> 4139 </div> 4140 4141 <a name='android_rs:min'></a> 4142 <div class='jd-details'> 4143 <h4 class='jd-details-title'> 4144 <span class='sympad'>min</span> 4145 <span class='normal'>: Minimum</span> 4146 </h4> 4147 <div class='jd-details-descr'> 4148 <table class='jd-tagtable'><tbody> 4149 <tr> 4150 <td>char min(char a, char b); 4151 </td> 4152 <td> </td> 4153 </tr> 4154 <tr> 4155 <td><a href='rs_value_types.html#android_rs:char2'>char2</a> min(<a href='rs_value_types.html#android_rs:char2'>char2</a> a, <a href='rs_value_types.html#android_rs:char2'>char2</a> b); 4156 </td> 4157 <td> </td> 4158 </tr> 4159 <tr> 4160 <td><a href='rs_value_types.html#android_rs:char3'>char3</a> min(<a href='rs_value_types.html#android_rs:char3'>char3</a> a, <a href='rs_value_types.html#android_rs:char3'>char3</a> b); 4161 </td> 4162 <td> </td> 4163 </tr> 4164 <tr> 4165 <td><a href='rs_value_types.html#android_rs:char4'>char4</a> min(<a href='rs_value_types.html#android_rs:char4'>char4</a> a, <a href='rs_value_types.html#android_rs:char4'>char4</a> b); 4166 </td> 4167 <td> </td> 4168 </tr> 4169 <tr> 4170 <td>float min(float a, float b); 4171 </td> 4172 <td> </td> 4173 </tr> 4174 <tr> 4175 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> min(<a href='rs_value_types.html#android_rs:float2'>float2</a> a, <a href='rs_value_types.html#android_rs:float2'>float2</a> b); 4176 </td> 4177 <td> </td> 4178 </tr> 4179 <tr> 4180 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> min(<a href='rs_value_types.html#android_rs:float3'>float3</a> a, <a href='rs_value_types.html#android_rs:float3'>float3</a> b); 4181 </td> 4182 <td> </td> 4183 </tr> 4184 <tr> 4185 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> min(<a href='rs_value_types.html#android_rs:float4'>float4</a> a, <a href='rs_value_types.html#android_rs:float4'>float4</a> b); 4186 </td> 4187 <td> </td> 4188 </tr> 4189 <tr> 4190 <td>int min(int a, int b); 4191 </td> 4192 <td> </td> 4193 </tr> 4194 <tr> 4195 <td><a href='rs_value_types.html#android_rs:int2'>int2</a> min(<a href='rs_value_types.html#android_rs:int2'>int2</a> a, <a href='rs_value_types.html#android_rs:int2'>int2</a> b); 4196 </td> 4197 <td> </td> 4198 </tr> 4199 <tr> 4200 <td><a href='rs_value_types.html#android_rs:int3'>int3</a> min(<a href='rs_value_types.html#android_rs:int3'>int3</a> a, <a href='rs_value_types.html#android_rs:int3'>int3</a> b); 4201 </td> 4202 <td> </td> 4203 </tr> 4204 <tr> 4205 <td><a href='rs_value_types.html#android_rs:int4'>int4</a> min(<a href='rs_value_types.html#android_rs:int4'>int4</a> a, <a href='rs_value_types.html#android_rs:int4'>int4</a> b); 4206 </td> 4207 <td> </td> 4208 </tr> 4209 <tr> 4210 <td>long min(long a, long b); 4211 </td> 4212 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4213 </td> 4214 </tr> 4215 <tr> 4216 <td><a href='rs_value_types.html#android_rs:long2'>long2</a> min(<a href='rs_value_types.html#android_rs:long2'>long2</a> a, <a href='rs_value_types.html#android_rs:long2'>long2</a> b); 4217 </td> 4218 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4219 </td> 4220 </tr> 4221 <tr> 4222 <td><a href='rs_value_types.html#android_rs:long3'>long3</a> min(<a href='rs_value_types.html#android_rs:long3'>long3</a> a, <a href='rs_value_types.html#android_rs:long3'>long3</a> b); 4223 </td> 4224 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4225 </td> 4226 </tr> 4227 <tr> 4228 <td><a href='rs_value_types.html#android_rs:long4'>long4</a> min(<a href='rs_value_types.html#android_rs:long4'>long4</a> a, <a href='rs_value_types.html#android_rs:long4'>long4</a> b); 4229 </td> 4230 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4231 </td> 4232 </tr> 4233 <tr> 4234 <td>short min(short a, short b); 4235 </td> 4236 <td> </td> 4237 </tr> 4238 <tr> 4239 <td><a href='rs_value_types.html#android_rs:short2'>short2</a> min(<a href='rs_value_types.html#android_rs:short2'>short2</a> a, <a href='rs_value_types.html#android_rs:short2'>short2</a> b); 4240 </td> 4241 <td> </td> 4242 </tr> 4243 <tr> 4244 <td><a href='rs_value_types.html#android_rs:short3'>short3</a> min(<a href='rs_value_types.html#android_rs:short3'>short3</a> a, <a href='rs_value_types.html#android_rs:short3'>short3</a> b); 4245 </td> 4246 <td> </td> 4247 </tr> 4248 <tr> 4249 <td><a href='rs_value_types.html#android_rs:short4'>short4</a> min(<a href='rs_value_types.html#android_rs:short4'>short4</a> a, <a href='rs_value_types.html#android_rs:short4'>short4</a> b); 4250 </td> 4251 <td> </td> 4252 </tr> 4253 <tr> 4254 <td><a href='rs_value_types.html#android_rs:uchar'>uchar</a> min(<a href='rs_value_types.html#android_rs:uchar'>uchar</a> a, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> b); 4255 </td> 4256 <td> </td> 4257 </tr> 4258 <tr> 4259 <td><a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> min(<a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> a, <a href='rs_value_types.html#android_rs:uchar2'>uchar2</a> b); 4260 </td> 4261 <td> </td> 4262 </tr> 4263 <tr> 4264 <td><a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> min(<a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> a, <a href='rs_value_types.html#android_rs:uchar3'>uchar3</a> b); 4265 </td> 4266 <td> </td> 4267 </tr> 4268 <tr> 4269 <td><a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> min(<a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> a, <a href='rs_value_types.html#android_rs:uchar4'>uchar4</a> b); 4270 </td> 4271 <td> </td> 4272 </tr> 4273 <tr> 4274 <td><a href='rs_value_types.html#android_rs:uint'>uint</a> min(<a href='rs_value_types.html#android_rs:uint'>uint</a> a, <a href='rs_value_types.html#android_rs:uint'>uint</a> b); 4275 </td> 4276 <td> </td> 4277 </tr> 4278 <tr> 4279 <td><a href='rs_value_types.html#android_rs:uint2'>uint2</a> min(<a href='rs_value_types.html#android_rs:uint2'>uint2</a> a, <a href='rs_value_types.html#android_rs:uint2'>uint2</a> b); 4280 </td> 4281 <td> </td> 4282 </tr> 4283 <tr> 4284 <td><a href='rs_value_types.html#android_rs:uint3'>uint3</a> min(<a href='rs_value_types.html#android_rs:uint3'>uint3</a> a, <a href='rs_value_types.html#android_rs:uint3'>uint3</a> b); 4285 </td> 4286 <td> </td> 4287 </tr> 4288 <tr> 4289 <td><a href='rs_value_types.html#android_rs:uint4'>uint4</a> min(<a href='rs_value_types.html#android_rs:uint4'>uint4</a> a, <a href='rs_value_types.html#android_rs:uint4'>uint4</a> b); 4290 </td> 4291 <td> </td> 4292 </tr> 4293 <tr> 4294 <td><a href='rs_value_types.html#android_rs:ulong'>ulong</a> min(<a href='rs_value_types.html#android_rs:ulong'>ulong</a> a, <a href='rs_value_types.html#android_rs:ulong'>ulong</a> b); 4295 </td> 4296 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4297 </td> 4298 </tr> 4299 <tr> 4300 <td><a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> min(<a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> a, <a href='rs_value_types.html#android_rs:ulong2'>ulong2</a> b); 4301 </td> 4302 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4303 </td> 4304 </tr> 4305 <tr> 4306 <td><a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> min(<a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> a, <a href='rs_value_types.html#android_rs:ulong3'>ulong3</a> b); 4307 </td> 4308 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4309 </td> 4310 </tr> 4311 <tr> 4312 <td><a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> min(<a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> a, <a href='rs_value_types.html#android_rs:ulong4'>ulong4</a> b); 4313 </td> 4314 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4315 </td> 4316 </tr> 4317 <tr> 4318 <td><a href='rs_value_types.html#android_rs:ushort'>ushort</a> min(<a href='rs_value_types.html#android_rs:ushort'>ushort</a> a, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> b); 4319 </td> 4320 <td> </td> 4321 </tr> 4322 <tr> 4323 <td><a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> min(<a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> a, <a href='rs_value_types.html#android_rs:ushort2'>ushort2</a> b); 4324 </td> 4325 <td> </td> 4326 </tr> 4327 <tr> 4328 <td><a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> min(<a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> a, <a href='rs_value_types.html#android_rs:ushort3'>ushort3</a> b); 4329 </td> 4330 <td> </td> 4331 </tr> 4332 <tr> 4333 <td><a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> min(<a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> a, <a href='rs_value_types.html#android_rs:ushort4'>ushort4</a> b); 4334 </td> 4335 <td> </td> 4336 </tr> 4337 </tbody></table> 4338 </div> 4339 <div class='jd-tagdata jd-tagdescr'> 4340 <p> Returns the minimum value of two arguments. 4341 </p> 4342 </div> 4343 </div> 4344 4345 <a name='android_rs:mix'></a> 4346 <div class='jd-details'> 4347 <h4 class='jd-details-title'> 4348 <span class='sympad'>mix</span> 4349 <span class='normal'>: Mixes two values</span> 4350 </h4> 4351 <div class='jd-details-descr'> 4352 <table class='jd-tagtable'><tbody> 4353 <tr> 4354 <td>float mix(float start, float stop, float fraction); 4355 </td> 4356 <td> </td> 4357 </tr> 4358 <tr> 4359 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> mix(<a href='rs_value_types.html#android_rs:float2'>float2</a> start, <a href='rs_value_types.html#android_rs:float2'>float2</a> stop, float fraction); 4360 </td> 4361 <td> </td> 4362 </tr> 4363 <tr> 4364 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> mix(<a href='rs_value_types.html#android_rs:float2'>float2</a> start, <a href='rs_value_types.html#android_rs:float2'>float2</a> stop, <a href='rs_value_types.html#android_rs:float2'>float2</a> fraction); 4365 </td> 4366 <td> </td> 4367 </tr> 4368 <tr> 4369 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> mix(<a href='rs_value_types.html#android_rs:float3'>float3</a> start, <a href='rs_value_types.html#android_rs:float3'>float3</a> stop, float fraction); 4370 </td> 4371 <td> </td> 4372 </tr> 4373 <tr> 4374 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> mix(<a href='rs_value_types.html#android_rs:float3'>float3</a> start, <a href='rs_value_types.html#android_rs:float3'>float3</a> stop, <a href='rs_value_types.html#android_rs:float3'>float3</a> fraction); 4375 </td> 4376 <td> </td> 4377 </tr> 4378 <tr> 4379 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> mix(<a href='rs_value_types.html#android_rs:float4'>float4</a> start, <a href='rs_value_types.html#android_rs:float4'>float4</a> stop, float fraction); 4380 </td> 4381 <td> </td> 4382 </tr> 4383 <tr> 4384 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> mix(<a href='rs_value_types.html#android_rs:float4'>float4</a> start, <a href='rs_value_types.html#android_rs:float4'>float4</a> stop, <a href='rs_value_types.html#android_rs:float4'>float4</a> fraction); 4385 </td> 4386 <td> </td> 4387 </tr> 4388 </tbody></table> 4389 </div> 4390 <div class='jd-tagdata jd-tagdescr'> 4391 <p> Returns start + ((stop - start) * fraction). 4392 </p> 4393 4394 <p> This can be useful for mixing two values. For example, to create a new color that is 4395 40% color1 and 60% color2, use <code>mix(color1, color2, 0.6f)</code>. 4396 </p> 4397 </div> 4398 </div> 4399 4400 <a name='android_rs:modf'></a> 4401 <div class='jd-details'> 4402 <h4 class='jd-details-title'> 4403 <span class='sympad'>modf</span> 4404 <span class='normal'>: Integral and fractional components</span> 4405 </h4> 4406 <div class='jd-details-descr'> 4407 <table class='jd-tagtable'><tbody> 4408 <tr> 4409 <td>float modf(float v, float* integral_part); 4410 </td> 4411 <td> </td> 4412 </tr> 4413 <tr> 4414 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> modf(<a href='rs_value_types.html#android_rs:float2'>float2</a> v, <a href='rs_value_types.html#android_rs:float2'>float2</a>* integral_part); 4415 </td> 4416 <td> </td> 4417 </tr> 4418 <tr> 4419 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> modf(<a href='rs_value_types.html#android_rs:float3'>float3</a> v, <a href='rs_value_types.html#android_rs:float3'>float3</a>* integral_part); 4420 </td> 4421 <td> </td> 4422 </tr> 4423 <tr> 4424 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> modf(<a href='rs_value_types.html#android_rs:float4'>float4</a> v, <a href='rs_value_types.html#android_rs:float4'>float4</a>* integral_part); 4425 </td> 4426 <td> </td> 4427 </tr> 4428 </tbody></table> 4429 </div> 4430 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 4431 <table class='jd-tagtable'><tbody> 4432 <tr><th>v</th><td>Source value.</td></tr> 4433 <tr><th>integral_part</th><td>*integral_part will be set to the integral portion of the number.</td></tr> 4434 </tbody></table> 4435 </div> 4436 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5> 4437 <table class='jd-tagtable'><tbody> 4438 <tr><td>Floating point portion of the value.</td></tr> 4439 </tbody></table> 4440 </div> 4441 <div class='jd-tagdata jd-tagdescr'> 4442 <p> Returns the integral and fractional components of a number. 4443 </p> 4444 4445 <p> Both components will have the same sign as x. For example, for an input of -3.72f, 4446 iret will be set to -3.f and .72f will be returned. 4447 </p> 4448 </div> 4449 </div> 4450 4451 <a name='android_rs:nan'></a> 4452 <div class='jd-details'> 4453 <h4 class='jd-details-title'> 4454 <span class='sympad'>nan</span> 4455 <span class='normal'>: Not a Number</span> 4456 </h4> 4457 <div class='jd-details-descr'> 4458 <table class='jd-tagtable'><tbody> 4459 <tr> 4460 <td>float nan(<a href='rs_value_types.html#android_rs:uint'>uint</a> v); 4461 </td> 4462 <td> </td> 4463 </tr> 4464 </tbody></table> 4465 </div> 4466 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 4467 <table class='jd-tagtable'><tbody> 4468 <tr><th>v</th><td>Not used.</td></tr> 4469 </tbody></table> 4470 </div> 4471 <div class='jd-tagdata jd-tagdescr'> 4472 <p> Returns a NaN value (Not a Number). 4473 </p> 4474 </div> 4475 </div> 4476 4477 <a name='android_rs:native_acos'></a> 4478 <div class='jd-details'> 4479 <h4 class='jd-details-title'> 4480 <span class='sympad'>native_acos</span> 4481 <span class='normal'>: Approximate inverse cosine</span> 4482 </h4> 4483 <div class='jd-details-descr'> 4484 <table class='jd-tagtable'><tbody> 4485 <tr> 4486 <td>float native_acos(float v); 4487 </td> 4488 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4489 </td> 4490 </tr> 4491 <tr> 4492 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_acos(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 4493 </td> 4494 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4495 </td> 4496 </tr> 4497 <tr> 4498 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_acos(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 4499 </td> 4500 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4501 </td> 4502 </tr> 4503 <tr> 4504 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_acos(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 4505 </td> 4506 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4507 </td> 4508 </tr> 4509 </tbody></table> 4510 </div> 4511 <div class='jd-tagdata jd-tagdescr'> 4512 <p> Returns the approximate inverse cosine, in radians. 4513 </p> 4514 4515 <p> This function yields undefined results from input values less than -1 or greater than 1. 4516 </p> 4517 4518 <p> See also <a href='rs_math.html#android_rs:acos'>acos</a>(). 4519 </p> 4520 </div> 4521 </div> 4522 4523 <a name='android_rs:native_acosh'></a> 4524 <div class='jd-details'> 4525 <h4 class='jd-details-title'> 4526 <span class='sympad'>native_acosh</span> 4527 <span class='normal'>: Approximate inverse hyperbolic cosine</span> 4528 </h4> 4529 <div class='jd-details-descr'> 4530 <table class='jd-tagtable'><tbody> 4531 <tr> 4532 <td>float native_acosh(float v); 4533 </td> 4534 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4535 </td> 4536 </tr> 4537 <tr> 4538 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_acosh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 4539 </td> 4540 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4541 </td> 4542 </tr> 4543 <tr> 4544 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_acosh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 4545 </td> 4546 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4547 </td> 4548 </tr> 4549 <tr> 4550 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_acosh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 4551 </td> 4552 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4553 </td> 4554 </tr> 4555 </tbody></table> 4556 </div> 4557 <div class='jd-tagdata jd-tagdescr'> 4558 <p> Returns the approximate inverse hyperbolic cosine, in radians. 4559 </p> 4560 4561 <p> See also <a href='rs_math.html#android_rs:acosh'>acosh</a>(). 4562 </p> 4563 </div> 4564 </div> 4565 4566 <a name='android_rs:native_acospi'></a> 4567 <div class='jd-details'> 4568 <h4 class='jd-details-title'> 4569 <span class='sympad'>native_acospi</span> 4570 <span class='normal'>: Approximate inverse cosine divided by pi</span> 4571 </h4> 4572 <div class='jd-details-descr'> 4573 <table class='jd-tagtable'><tbody> 4574 <tr> 4575 <td>float native_acospi(float v); 4576 </td> 4577 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4578 </td> 4579 </tr> 4580 <tr> 4581 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_acospi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 4582 </td> 4583 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4584 </td> 4585 </tr> 4586 <tr> 4587 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_acospi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 4588 </td> 4589 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4590 </td> 4591 </tr> 4592 <tr> 4593 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_acospi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 4594 </td> 4595 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4596 </td> 4597 </tr> 4598 </tbody></table> 4599 </div> 4600 <div class='jd-tagdata jd-tagdescr'> 4601 <p> Returns the approximate inverse cosine in radians, divided by pi. 4602 </p> 4603 4604 <p> To get an inverse cosine measured in degrees, use <code>acospi(a) * 180.f</code>. 4605 </p> 4606 4607 <p> This function yields undefined results from input values less than -1 or greater than 1. 4608 </p> 4609 4610 <p> See also <a href='rs_math.html#android_rs:acospi'>acospi</a>(). 4611 </p> 4612 </div> 4613 </div> 4614 4615 <a name='android_rs:native_asin'></a> 4616 <div class='jd-details'> 4617 <h4 class='jd-details-title'> 4618 <span class='sympad'>native_asin</span> 4619 <span class='normal'>: Approximate inverse sine</span> 4620 </h4> 4621 <div class='jd-details-descr'> 4622 <table class='jd-tagtable'><tbody> 4623 <tr> 4624 <td>float native_asin(float v); 4625 </td> 4626 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4627 </td> 4628 </tr> 4629 <tr> 4630 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_asin(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 4631 </td> 4632 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4633 </td> 4634 </tr> 4635 <tr> 4636 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_asin(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 4637 </td> 4638 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4639 </td> 4640 </tr> 4641 <tr> 4642 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_asin(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 4643 </td> 4644 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4645 </td> 4646 </tr> 4647 </tbody></table> 4648 </div> 4649 <div class='jd-tagdata jd-tagdescr'> 4650 <p> Returns the approximate inverse sine, in radians. 4651 </p> 4652 4653 <p> This function yields undefined results from input values less than -1 or greater than 1. 4654 </p> 4655 4656 <p> See also <a href='rs_math.html#android_rs:asin'>asin</a>(). 4657 </p> 4658 </div> 4659 </div> 4660 4661 <a name='android_rs:native_asinh'></a> 4662 <div class='jd-details'> 4663 <h4 class='jd-details-title'> 4664 <span class='sympad'>native_asinh</span> 4665 <span class='normal'>: Approximate inverse hyperbolic sine</span> 4666 </h4> 4667 <div class='jd-details-descr'> 4668 <table class='jd-tagtable'><tbody> 4669 <tr> 4670 <td>float native_asinh(float v); 4671 </td> 4672 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4673 </td> 4674 </tr> 4675 <tr> 4676 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_asinh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 4677 </td> 4678 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4679 </td> 4680 </tr> 4681 <tr> 4682 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_asinh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 4683 </td> 4684 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4685 </td> 4686 </tr> 4687 <tr> 4688 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_asinh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 4689 </td> 4690 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4691 </td> 4692 </tr> 4693 </tbody></table> 4694 </div> 4695 <div class='jd-tagdata jd-tagdescr'> 4696 <p> Returns the approximate inverse hyperbolic sine, in radians. 4697 </p> 4698 4699 <p> See also <a href='rs_math.html#android_rs:asinh'>asinh</a>(). 4700 </p> 4701 </div> 4702 </div> 4703 4704 <a name='android_rs:native_asinpi'></a> 4705 <div class='jd-details'> 4706 <h4 class='jd-details-title'> 4707 <span class='sympad'>native_asinpi</span> 4708 <span class='normal'>: Approximate inverse sine divided by pi</span> 4709 </h4> 4710 <div class='jd-details-descr'> 4711 <table class='jd-tagtable'><tbody> 4712 <tr> 4713 <td>float native_asinpi(float v); 4714 </td> 4715 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4716 </td> 4717 </tr> 4718 <tr> 4719 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_asinpi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 4720 </td> 4721 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4722 </td> 4723 </tr> 4724 <tr> 4725 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_asinpi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 4726 </td> 4727 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4728 </td> 4729 </tr> 4730 <tr> 4731 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_asinpi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 4732 </td> 4733 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4734 </td> 4735 </tr> 4736 </tbody></table> 4737 </div> 4738 <div class='jd-tagdata jd-tagdescr'> 4739 <p> Returns the approximate inverse sine in radians, divided by pi. 4740 </p> 4741 4742 <p> To get an inverse sine measured in degrees, use <code>asinpi(a) * 180.f</code>. 4743 </p> 4744 4745 <p> This function yields undefined results from input values less than -1 or greater than 1. 4746 </p> 4747 4748 <p> See also <a href='rs_math.html#android_rs:asinpi'>asinpi</a>(). 4749 </p> 4750 </div> 4751 </div> 4752 4753 <a name='android_rs:native_atan'></a> 4754 <div class='jd-details'> 4755 <h4 class='jd-details-title'> 4756 <span class='sympad'>native_atan</span> 4757 <span class='normal'>: Approximate inverse tangent</span> 4758 </h4> 4759 <div class='jd-details-descr'> 4760 <table class='jd-tagtable'><tbody> 4761 <tr> 4762 <td>float native_atan(float v); 4763 </td> 4764 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4765 </td> 4766 </tr> 4767 <tr> 4768 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_atan(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 4769 </td> 4770 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4771 </td> 4772 </tr> 4773 <tr> 4774 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_atan(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 4775 </td> 4776 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4777 </td> 4778 </tr> 4779 <tr> 4780 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_atan(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 4781 </td> 4782 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4783 </td> 4784 </tr> 4785 </tbody></table> 4786 </div> 4787 <div class='jd-tagdata jd-tagdescr'> 4788 <p> Returns the approximate inverse tangent, in radians. 4789 </p> 4790 4791 <p> See also <a href='rs_math.html#android_rs:atan'>atan</a>(). 4792 </p> 4793 </div> 4794 </div> 4795 4796 <a name='android_rs:native_atan2'></a> 4797 <div class='jd-details'> 4798 <h4 class='jd-details-title'> 4799 <span class='sympad'>native_atan2</span> 4800 <span class='normal'>: Approximate inverse tangent of a ratio</span> 4801 </h4> 4802 <div class='jd-details-descr'> 4803 <table class='jd-tagtable'><tbody> 4804 <tr> 4805 <td>float native_atan2(float numerator, float denominator); 4806 </td> 4807 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4808 </td> 4809 </tr> 4810 <tr> 4811 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_atan2(<a href='rs_value_types.html#android_rs:float2'>float2</a> numerator, <a href='rs_value_types.html#android_rs:float2'>float2</a> denominator); 4812 </td> 4813 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4814 </td> 4815 </tr> 4816 <tr> 4817 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_atan2(<a href='rs_value_types.html#android_rs:float3'>float3</a> numerator, <a href='rs_value_types.html#android_rs:float3'>float3</a> denominator); 4818 </td> 4819 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4820 </td> 4821 </tr> 4822 <tr> 4823 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_atan2(<a href='rs_value_types.html#android_rs:float4'>float4</a> numerator, <a href='rs_value_types.html#android_rs:float4'>float4</a> denominator); 4824 </td> 4825 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4826 </td> 4827 </tr> 4828 </tbody></table> 4829 </div> 4830 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 4831 <table class='jd-tagtable'><tbody> 4832 <tr><th>numerator</th><td>Numerator.</td></tr> 4833 <tr><th>denominator</th><td>Denominator. Can be 0.</td></tr> 4834 </tbody></table> 4835 </div> 4836 <div class='jd-tagdata jd-tagdescr'> 4837 <p> Returns the approximate inverse tangent of <code>(numerator / denominator)</code>, in radians. 4838 </p> 4839 4840 <p> See also <a href='rs_math.html#android_rs:atan2'>atan2</a>(). 4841 </p> 4842 </div> 4843 </div> 4844 4845 <a name='android_rs:native_atan2pi'></a> 4846 <div class='jd-details'> 4847 <h4 class='jd-details-title'> 4848 <span class='sympad'>native_atan2pi</span> 4849 <span class='normal'>: Approximate inverse tangent of a ratio, divided by pi</span> 4850 </h4> 4851 <div class='jd-details-descr'> 4852 <table class='jd-tagtable'><tbody> 4853 <tr> 4854 <td>float native_atan2pi(float numerator, float denominator); 4855 </td> 4856 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4857 </td> 4858 </tr> 4859 <tr> 4860 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_atan2pi(<a href='rs_value_types.html#android_rs:float2'>float2</a> numerator, <a href='rs_value_types.html#android_rs:float2'>float2</a> denominator); 4861 </td> 4862 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4863 </td> 4864 </tr> 4865 <tr> 4866 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_atan2pi(<a href='rs_value_types.html#android_rs:float3'>float3</a> numerator, <a href='rs_value_types.html#android_rs:float3'>float3</a> denominator); 4867 </td> 4868 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4869 </td> 4870 </tr> 4871 <tr> 4872 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_atan2pi(<a href='rs_value_types.html#android_rs:float4'>float4</a> numerator, <a href='rs_value_types.html#android_rs:float4'>float4</a> denominator); 4873 </td> 4874 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4875 </td> 4876 </tr> 4877 </tbody></table> 4878 </div> 4879 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 4880 <table class='jd-tagtable'><tbody> 4881 <tr><th>numerator</th><td>Numerator.</td></tr> 4882 <tr><th>denominator</th><td>Denominator. Can be 0.</td></tr> 4883 </tbody></table> 4884 </div> 4885 <div class='jd-tagdata jd-tagdescr'> 4886 <p> Returns the approximate inverse tangent of <code>(numerator / denominator)</code>, 4887 in radians, divided by pi. 4888 </p> 4889 4890 <p> To get an inverse tangent measured in degrees, use <code>atan2pi(n, d) * 180.f</code>. 4891 </p> 4892 4893 <p> See also <a href='rs_math.html#android_rs:atan2pi'>atan2pi</a>(). 4894 </p> 4895 </div> 4896 </div> 4897 4898 <a name='android_rs:native_atanh'></a> 4899 <div class='jd-details'> 4900 <h4 class='jd-details-title'> 4901 <span class='sympad'>native_atanh</span> 4902 <span class='normal'>: Approximate inverse hyperbolic tangent</span> 4903 </h4> 4904 <div class='jd-details-descr'> 4905 <table class='jd-tagtable'><tbody> 4906 <tr> 4907 <td>float native_atanh(float v); 4908 </td> 4909 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4910 </td> 4911 </tr> 4912 <tr> 4913 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_atanh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 4914 </td> 4915 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4916 </td> 4917 </tr> 4918 <tr> 4919 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_atanh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 4920 </td> 4921 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4922 </td> 4923 </tr> 4924 <tr> 4925 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_atanh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 4926 </td> 4927 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4928 </td> 4929 </tr> 4930 </tbody></table> 4931 </div> 4932 <div class='jd-tagdata jd-tagdescr'> 4933 <p> Returns the approximate inverse hyperbolic tangent, in radians. 4934 </p> 4935 4936 <p> See also <a href='rs_math.html#android_rs:atanh'>atanh</a>(). 4937 </p> 4938 </div> 4939 </div> 4940 4941 <a name='android_rs:native_atanpi'></a> 4942 <div class='jd-details'> 4943 <h4 class='jd-details-title'> 4944 <span class='sympad'>native_atanpi</span> 4945 <span class='normal'>: Approximate inverse tangent divided by pi</span> 4946 </h4> 4947 <div class='jd-details-descr'> 4948 <table class='jd-tagtable'><tbody> 4949 <tr> 4950 <td>float native_atanpi(float v); 4951 </td> 4952 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4953 </td> 4954 </tr> 4955 <tr> 4956 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_atanpi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 4957 </td> 4958 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4959 </td> 4960 </tr> 4961 <tr> 4962 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_atanpi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 4963 </td> 4964 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4965 </td> 4966 </tr> 4967 <tr> 4968 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_atanpi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 4969 </td> 4970 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4971 </td> 4972 </tr> 4973 </tbody></table> 4974 </div> 4975 <div class='jd-tagdata jd-tagdescr'> 4976 <p> Returns the approximate inverse tangent in radians, divided by pi. 4977 </p> 4978 4979 <p> To get an inverse tangent measured in degrees, use <code>atanpi(a) * 180.f</code>. 4980 </p> 4981 4982 <p> See also <a href='rs_math.html#android_rs:atanpi'>atanpi</a>(). 4983 </p> 4984 </div> 4985 </div> 4986 4987 <a name='android_rs:native_cbrt'></a> 4988 <div class='jd-details'> 4989 <h4 class='jd-details-title'> 4990 <span class='sympad'>native_cbrt</span> 4991 <span class='normal'>: Approximate cube root</span> 4992 </h4> 4993 <div class='jd-details-descr'> 4994 <table class='jd-tagtable'><tbody> 4995 <tr> 4996 <td>float native_cbrt(float v); 4997 </td> 4998 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4999 </td> 5000 </tr> 5001 <tr> 5002 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_cbrt(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5003 </td> 5004 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5005 </td> 5006 </tr> 5007 <tr> 5008 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_cbrt(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5009 </td> 5010 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5011 </td> 5012 </tr> 5013 <tr> 5014 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_cbrt(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5015 </td> 5016 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5017 </td> 5018 </tr> 5019 </tbody></table> 5020 </div> 5021 <div class='jd-tagdata jd-tagdescr'> 5022 <p> Returns the approximate cubic root. 5023 </p> 5024 5025 <p> See also <a href='rs_math.html#android_rs:cbrt'>cbrt</a>(). 5026 </p> 5027 </div> 5028 </div> 5029 5030 <a name='android_rs:native_cos'></a> 5031 <div class='jd-details'> 5032 <h4 class='jd-details-title'> 5033 <span class='sympad'>native_cos</span> 5034 <span class='normal'>: Approximate cosine</span> 5035 </h4> 5036 <div class='jd-details-descr'> 5037 <table class='jd-tagtable'><tbody> 5038 <tr> 5039 <td>float native_cos(float v); 5040 </td> 5041 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5042 </td> 5043 </tr> 5044 <tr> 5045 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_cos(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5046 </td> 5047 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5048 </td> 5049 </tr> 5050 <tr> 5051 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_cos(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5052 </td> 5053 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5054 </td> 5055 </tr> 5056 <tr> 5057 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_cos(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5058 </td> 5059 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5060 </td> 5061 </tr> 5062 </tbody></table> 5063 </div> 5064 <div class='jd-tagdata jd-tagdescr'> 5065 <p> Returns the approximate cosine of an angle measured in radians. 5066 </p> 5067 5068 <p> See also <a href='rs_math.html#android_rs:cos'>cos</a>(). 5069 </p> 5070 </div> 5071 </div> 5072 5073 <a name='android_rs:native_cosh'></a> 5074 <div class='jd-details'> 5075 <h4 class='jd-details-title'> 5076 <span class='sympad'>native_cosh</span> 5077 <span class='normal'>: Approximate hypebolic cosine</span> 5078 </h4> 5079 <div class='jd-details-descr'> 5080 <table class='jd-tagtable'><tbody> 5081 <tr> 5082 <td>float native_cosh(float v); 5083 </td> 5084 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5085 </td> 5086 </tr> 5087 <tr> 5088 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_cosh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5089 </td> 5090 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5091 </td> 5092 </tr> 5093 <tr> 5094 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_cosh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5095 </td> 5096 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5097 </td> 5098 </tr> 5099 <tr> 5100 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_cosh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5101 </td> 5102 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5103 </td> 5104 </tr> 5105 </tbody></table> 5106 </div> 5107 <div class='jd-tagdata jd-tagdescr'> 5108 <p> Returns the approximate hypebolic cosine. 5109 </p> 5110 5111 <p> See also <a href='rs_math.html#android_rs:cosh'>cosh</a>(). 5112 </p> 5113 </div> 5114 </div> 5115 5116 <a name='android_rs:native_cospi'></a> 5117 <div class='jd-details'> 5118 <h4 class='jd-details-title'> 5119 <span class='sympad'>native_cospi</span> 5120 <span class='normal'>: Approximate cosine of a number multiplied by pi</span> 5121 </h4> 5122 <div class='jd-details-descr'> 5123 <table class='jd-tagtable'><tbody> 5124 <tr> 5125 <td>float native_cospi(float v); 5126 </td> 5127 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5128 </td> 5129 </tr> 5130 <tr> 5131 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_cospi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5132 </td> 5133 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5134 </td> 5135 </tr> 5136 <tr> 5137 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_cospi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5138 </td> 5139 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5140 </td> 5141 </tr> 5142 <tr> 5143 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_cospi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5144 </td> 5145 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5146 </td> 5147 </tr> 5148 </tbody></table> 5149 </div> 5150 <div class='jd-tagdata jd-tagdescr'> 5151 <p> Returns the approximate cosine of (v * pi), where (v * pi) is measured in radians. 5152 </p> 5153 5154 <p> To get the cosine of a value measured in degrees, call <code>cospi(v / 180.f)</code>. 5155 </p> 5156 5157 <p> See also <a href='rs_math.html#android_rs:cospi'>cospi</a>(). 5158 </p> 5159 </div> 5160 </div> 5161 5162 <a name='android_rs:native_divide'></a> 5163 <div class='jd-details'> 5164 <h4 class='jd-details-title'> 5165 <span class='sympad'>native_divide</span> 5166 <span class='normal'>: Approximate division</span> 5167 </h4> 5168 <div class='jd-details-descr'> 5169 <table class='jd-tagtable'><tbody> 5170 <tr> 5171 <td>float native_divide(float left_vector, float right_vector); 5172 </td> 5173 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5174 </td> 5175 </tr> 5176 <tr> 5177 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_divide(<a href='rs_value_types.html#android_rs:float2'>float2</a> left_vector, <a href='rs_value_types.html#android_rs:float2'>float2</a> right_vector); 5178 </td> 5179 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5180 </td> 5181 </tr> 5182 <tr> 5183 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_divide(<a href='rs_value_types.html#android_rs:float3'>float3</a> left_vector, <a href='rs_value_types.html#android_rs:float3'>float3</a> right_vector); 5184 </td> 5185 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5186 </td> 5187 </tr> 5188 <tr> 5189 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_divide(<a href='rs_value_types.html#android_rs:float4'>float4</a> left_vector, <a href='rs_value_types.html#android_rs:float4'>float4</a> right_vector); 5190 </td> 5191 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5192 </td> 5193 </tr> 5194 </tbody></table> 5195 </div> 5196 <div class='jd-tagdata jd-tagdescr'> 5197 <p> Computes the approximate division of two values. 5198 </p> 5199 </div> 5200 </div> 5201 5202 <a name='android_rs:native_exp'></a> 5203 <div class='jd-details'> 5204 <h4 class='jd-details-title'> 5205 <span class='sympad'>native_exp</span> 5206 <span class='normal'>: Approximate e raised to a number</span> 5207 </h4> 5208 <div class='jd-details-descr'> 5209 <table class='jd-tagtable'><tbody> 5210 <tr> 5211 <td>float native_exp(float v); 5212 </td> 5213 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5214 </td> 5215 </tr> 5216 <tr> 5217 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_exp(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5218 </td> 5219 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5220 </td> 5221 </tr> 5222 <tr> 5223 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_exp(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5224 </td> 5225 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5226 </td> 5227 </tr> 5228 <tr> 5229 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_exp(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5230 </td> 5231 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5232 </td> 5233 </tr> 5234 </tbody></table> 5235 </div> 5236 <div class='jd-tagdata jd-tagdescr'> 5237 <p> Fast approximate exp. 5238 </p> 5239 5240 <p> It is valid for inputs from -86.f to 86.f. The precision is no worse than what would be 5241 expected from using 16 bit floating point values. 5242 </p> 5243 5244 <p> See also <a href='rs_math.html#android_rs:exp'>exp</a>(). 5245 </p> 5246 </div> 5247 </div> 5248 5249 <a name='android_rs:native_exp10'></a> 5250 <div class='jd-details'> 5251 <h4 class='jd-details-title'> 5252 <span class='sympad'>native_exp10</span> 5253 <span class='normal'>: Approximate 10 raised to a number</span> 5254 </h4> 5255 <div class='jd-details-descr'> 5256 <table class='jd-tagtable'><tbody> 5257 <tr> 5258 <td>float native_exp10(float v); 5259 </td> 5260 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5261 </td> 5262 </tr> 5263 <tr> 5264 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_exp10(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5265 </td> 5266 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5267 </td> 5268 </tr> 5269 <tr> 5270 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_exp10(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5271 </td> 5272 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5273 </td> 5274 </tr> 5275 <tr> 5276 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_exp10(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5277 </td> 5278 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5279 </td> 5280 </tr> 5281 </tbody></table> 5282 </div> 5283 <div class='jd-tagdata jd-tagdescr'> 5284 <p> Fast approximate exp10. 5285 </p> 5286 5287 <p> It is valid for inputs from -37.f to 37.f. The precision is no worse than what would be 5288 expected from using 16 bit floating point values. 5289 </p> 5290 5291 <p> See also <a href='rs_math.html#android_rs:exp10'>exp10</a>(). 5292 </p> 5293 </div> 5294 </div> 5295 5296 <a name='android_rs:native_exp2'></a> 5297 <div class='jd-details'> 5298 <h4 class='jd-details-title'> 5299 <span class='sympad'>native_exp2</span> 5300 <span class='normal'>: Approximate 2 raised to a number</span> 5301 </h4> 5302 <div class='jd-details-descr'> 5303 <table class='jd-tagtable'><tbody> 5304 <tr> 5305 <td>float native_exp2(float v); 5306 </td> 5307 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5308 </td> 5309 </tr> 5310 <tr> 5311 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_exp2(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5312 </td> 5313 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5314 </td> 5315 </tr> 5316 <tr> 5317 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_exp2(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5318 </td> 5319 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5320 </td> 5321 </tr> 5322 <tr> 5323 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_exp2(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5324 </td> 5325 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5326 </td> 5327 </tr> 5328 </tbody></table> 5329 </div> 5330 <div class='jd-tagdata jd-tagdescr'> 5331 <p> Fast approximate exp2. 5332 </p> 5333 5334 <p> It is valid for inputs from -125.f to 125.f. The precision is no worse than what would be 5335 expected from using 16 bit floating point values. 5336 </p> 5337 5338 <p> See also <a href='rs_math.html#android_rs:exp2'>exp2</a>(). 5339 </p> 5340 </div> 5341 </div> 5342 5343 <a name='android_rs:native_expm1'></a> 5344 <div class='jd-details'> 5345 <h4 class='jd-details-title'> 5346 <span class='sympad'>native_expm1</span> 5347 <span class='normal'>: Approximate e raised to a number minus one</span> 5348 </h4> 5349 <div class='jd-details-descr'> 5350 <table class='jd-tagtable'><tbody> 5351 <tr> 5352 <td>float native_expm1(float v); 5353 </td> 5354 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5355 </td> 5356 </tr> 5357 <tr> 5358 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_expm1(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5359 </td> 5360 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5361 </td> 5362 </tr> 5363 <tr> 5364 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_expm1(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5365 </td> 5366 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5367 </td> 5368 </tr> 5369 <tr> 5370 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_expm1(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5371 </td> 5372 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5373 </td> 5374 </tr> 5375 </tbody></table> 5376 </div> 5377 <div class='jd-tagdata jd-tagdescr'> 5378 <p> Returns the approximate (e ^ v) - 1. 5379 </p> 5380 5381 <p> See also <a href='rs_math.html#android_rs:expm1'>expm1</a>(). 5382 </p> 5383 </div> 5384 </div> 5385 5386 <a name='android_rs:native_hypot'></a> 5387 <div class='jd-details'> 5388 <h4 class='jd-details-title'> 5389 <span class='sympad'>native_hypot</span> 5390 <span class='normal'>: Approximate hypotenuse</span> 5391 </h4> 5392 <div class='jd-details-descr'> 5393 <table class='jd-tagtable'><tbody> 5394 <tr> 5395 <td>float native_hypot(float a, float b); 5396 </td> 5397 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5398 </td> 5399 </tr> 5400 <tr> 5401 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_hypot(<a href='rs_value_types.html#android_rs:float2'>float2</a> a, <a href='rs_value_types.html#android_rs:float2'>float2</a> b); 5402 </td> 5403 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5404 </td> 5405 </tr> 5406 <tr> 5407 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_hypot(<a href='rs_value_types.html#android_rs:float3'>float3</a> a, <a href='rs_value_types.html#android_rs:float3'>float3</a> b); 5408 </td> 5409 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5410 </td> 5411 </tr> 5412 <tr> 5413 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_hypot(<a href='rs_value_types.html#android_rs:float4'>float4</a> a, <a href='rs_value_types.html#android_rs:float4'>float4</a> b); 5414 </td> 5415 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5416 </td> 5417 </tr> 5418 </tbody></table> 5419 </div> 5420 <div class='jd-tagdata jd-tagdescr'> 5421 <p> Returns the approximate native_sqrt(a * a + b * b) 5422 </p> 5423 5424 <p> See also <a href='rs_math.html#android_rs:hypot'>hypot</a>(). 5425 </p> 5426 </div> 5427 </div> 5428 5429 <a name='android_rs:native_log'></a> 5430 <div class='jd-details'> 5431 <h4 class='jd-details-title'> 5432 <span class='sympad'>native_log</span> 5433 <span class='normal'>: Approximate natural logarithm</span> 5434 </h4> 5435 <div class='jd-details-descr'> 5436 <table class='jd-tagtable'><tbody> 5437 <tr> 5438 <td>float native_log(float v); 5439 </td> 5440 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5441 </td> 5442 </tr> 5443 <tr> 5444 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_log(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5445 </td> 5446 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5447 </td> 5448 </tr> 5449 <tr> 5450 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_log(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5451 </td> 5452 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5453 </td> 5454 </tr> 5455 <tr> 5456 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_log(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5457 </td> 5458 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5459 </td> 5460 </tr> 5461 </tbody></table> 5462 </div> 5463 <div class='jd-tagdata jd-tagdescr'> 5464 <p> Fast approximate log. 5465 </p> 5466 5467 <p> It is not accurate for values very close to zero. 5468 </p> 5469 5470 <p> See also <a href='rs_math.html#android_rs:log'>log</a>(). 5471 </p> 5472 </div> 5473 </div> 5474 5475 <a name='android_rs:native_log10'></a> 5476 <div class='jd-details'> 5477 <h4 class='jd-details-title'> 5478 <span class='sympad'>native_log10</span> 5479 <span class='normal'>: Approximate base 10 logarithm</span> 5480 </h4> 5481 <div class='jd-details-descr'> 5482 <table class='jd-tagtable'><tbody> 5483 <tr> 5484 <td>float native_log10(float v); 5485 </td> 5486 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5487 </td> 5488 </tr> 5489 <tr> 5490 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_log10(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5491 </td> 5492 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5493 </td> 5494 </tr> 5495 <tr> 5496 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_log10(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5497 </td> 5498 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5499 </td> 5500 </tr> 5501 <tr> 5502 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_log10(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5503 </td> 5504 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5505 </td> 5506 </tr> 5507 </tbody></table> 5508 </div> 5509 <div class='jd-tagdata jd-tagdescr'> 5510 <p> Fast approximate log10. 5511 </p> 5512 5513 <p> It is not accurate for values very close to zero. 5514 </p> 5515 5516 <p> See also <a href='rs_math.html#android_rs:log10'>log10</a>(). 5517 </p> 5518 </div> 5519 </div> 5520 5521 <a name='android_rs:native_log1p'></a> 5522 <div class='jd-details'> 5523 <h4 class='jd-details-title'> 5524 <span class='sympad'>native_log1p</span> 5525 <span class='normal'>: Approximate natural logarithm of a value plus 1</span> 5526 </h4> 5527 <div class='jd-details-descr'> 5528 <table class='jd-tagtable'><tbody> 5529 <tr> 5530 <td>float native_log1p(float v); 5531 </td> 5532 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5533 </td> 5534 </tr> 5535 <tr> 5536 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_log1p(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5537 </td> 5538 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5539 </td> 5540 </tr> 5541 <tr> 5542 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_log1p(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5543 </td> 5544 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5545 </td> 5546 </tr> 5547 <tr> 5548 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_log1p(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5549 </td> 5550 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5551 </td> 5552 </tr> 5553 </tbody></table> 5554 </div> 5555 <div class='jd-tagdata jd-tagdescr'> 5556 <p> Returns the approximate natural logarithm of (v + 1.0f) 5557 </p> 5558 5559 <p> See also <a href='rs_math.html#android_rs:log1p'>log1p</a>(). 5560 </p> 5561 </div> 5562 </div> 5563 5564 <a name='android_rs:native_log2'></a> 5565 <div class='jd-details'> 5566 <h4 class='jd-details-title'> 5567 <span class='sympad'>native_log2</span> 5568 <span class='normal'>: Approximate base 2 logarithm</span> 5569 </h4> 5570 <div class='jd-details-descr'> 5571 <table class='jd-tagtable'><tbody> 5572 <tr> 5573 <td>float native_log2(float v); 5574 </td> 5575 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5576 </td> 5577 </tr> 5578 <tr> 5579 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_log2(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5580 </td> 5581 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5582 </td> 5583 </tr> 5584 <tr> 5585 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_log2(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5586 </td> 5587 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5588 </td> 5589 </tr> 5590 <tr> 5591 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_log2(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5592 </td> 5593 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5594 </td> 5595 </tr> 5596 </tbody></table> 5597 </div> 5598 <div class='jd-tagdata jd-tagdescr'> 5599 <p> Fast approximate log2. 5600 </p> 5601 5602 <p> It is not accurate for values very close to zero. 5603 </p> 5604 5605 <p> See also <a href='rs_math.html#android_rs:log2'>log2</a>(). 5606 </p> 5607 </div> 5608 </div> 5609 5610 <a name='android_rs:native_powr'></a> 5611 <div class='jd-details'> 5612 <h4 class='jd-details-title'> 5613 <span class='sympad'>native_powr</span> 5614 <span class='normal'>: Approximate positive base raised to an exponent</span> 5615 </h4> 5616 <div class='jd-details-descr'> 5617 <table class='jd-tagtable'><tbody> 5618 <tr> 5619 <td>float native_powr(float base, float exponent); 5620 </td> 5621 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5622 </td> 5623 </tr> 5624 <tr> 5625 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_powr(<a href='rs_value_types.html#android_rs:float2'>float2</a> base, <a href='rs_value_types.html#android_rs:float2'>float2</a> exponent); 5626 </td> 5627 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5628 </td> 5629 </tr> 5630 <tr> 5631 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_powr(<a href='rs_value_types.html#android_rs:float3'>float3</a> base, <a href='rs_value_types.html#android_rs:float3'>float3</a> exponent); 5632 </td> 5633 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5634 </td> 5635 </tr> 5636 <tr> 5637 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_powr(<a href='rs_value_types.html#android_rs:float4'>float4</a> base, <a href='rs_value_types.html#android_rs:float4'>float4</a> exponent); 5638 </td> 5639 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5640 </td> 5641 </tr> 5642 </tbody></table> 5643 </div> 5644 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 5645 <table class='jd-tagtable'><tbody> 5646 <tr><th>base</th><td>Must be between 0.f and 256.f. The function is not accurate for values very close to zero.</td></tr> 5647 <tr><th>exponent</th><td>Must be between -15.f and 15.f.</td></tr> 5648 </tbody></table> 5649 </div> 5650 <div class='jd-tagdata jd-tagdescr'> 5651 <p> Fast approximate (base ^ exponent). 5652 </p> 5653 5654 <p> See also <a href='rs_math.html#android_rs:powr'>powr</a>(). 5655 </p> 5656 </div> 5657 </div> 5658 5659 <a name='android_rs:native_recip'></a> 5660 <div class='jd-details'> 5661 <h4 class='jd-details-title'> 5662 <span class='sympad'>native_recip</span> 5663 <span class='normal'>: Approximate reciprocal</span> 5664 </h4> 5665 <div class='jd-details-descr'> 5666 <table class='jd-tagtable'><tbody> 5667 <tr> 5668 <td>float native_recip(float v); 5669 </td> 5670 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5671 </td> 5672 </tr> 5673 <tr> 5674 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_recip(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5675 </td> 5676 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5677 </td> 5678 </tr> 5679 <tr> 5680 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_recip(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5681 </td> 5682 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5683 </td> 5684 </tr> 5685 <tr> 5686 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_recip(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5687 </td> 5688 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5689 </td> 5690 </tr> 5691 </tbody></table> 5692 </div> 5693 <div class='jd-tagdata jd-tagdescr'> 5694 <p> Returns the approximate approximate reciprocal of a value. 5695 </p> 5696 5697 <p> See also <a href='rs_math.html#android_rs:half_recip'>half_recip</a>(). 5698 </p> 5699 </div> 5700 </div> 5701 5702 <a name='android_rs:native_rootn'></a> 5703 <div class='jd-details'> 5704 <h4 class='jd-details-title'> 5705 <span class='sympad'>native_rootn</span> 5706 <span class='normal'>: Approximate nth root</span> 5707 </h4> 5708 <div class='jd-details-descr'> 5709 <table class='jd-tagtable'><tbody> 5710 <tr> 5711 <td>float native_rootn(float v, int n); 5712 </td> 5713 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5714 </td> 5715 </tr> 5716 <tr> 5717 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_rootn(<a href='rs_value_types.html#android_rs:float2'>float2</a> v, <a href='rs_value_types.html#android_rs:int2'>int2</a> n); 5718 </td> 5719 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5720 </td> 5721 </tr> 5722 <tr> 5723 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_rootn(<a href='rs_value_types.html#android_rs:float3'>float3</a> v, <a href='rs_value_types.html#android_rs:int3'>int3</a> n); 5724 </td> 5725 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5726 </td> 5727 </tr> 5728 <tr> 5729 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_rootn(<a href='rs_value_types.html#android_rs:float4'>float4</a> v, <a href='rs_value_types.html#android_rs:int4'>int4</a> n); 5730 </td> 5731 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5732 </td> 5733 </tr> 5734 </tbody></table> 5735 </div> 5736 <div class='jd-tagdata jd-tagdescr'> 5737 <p> Compute the approximate Nth root of a value. 5738 </p> 5739 5740 <p> See also <a href='rs_math.html#android_rs:rootn'>rootn</a>(). 5741 </p> 5742 </div> 5743 </div> 5744 5745 <a name='android_rs:native_rsqrt'></a> 5746 <div class='jd-details'> 5747 <h4 class='jd-details-title'> 5748 <span class='sympad'>native_rsqrt</span> 5749 <span class='normal'>: Approximate reciprocal of a square root</span> 5750 </h4> 5751 <div class='jd-details-descr'> 5752 <table class='jd-tagtable'><tbody> 5753 <tr> 5754 <td>float native_rsqrt(float v); 5755 </td> 5756 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5757 </td> 5758 </tr> 5759 <tr> 5760 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_rsqrt(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5761 </td> 5762 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5763 </td> 5764 </tr> 5765 <tr> 5766 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_rsqrt(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5767 </td> 5768 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5769 </td> 5770 </tr> 5771 <tr> 5772 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_rsqrt(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5773 </td> 5774 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5775 </td> 5776 </tr> 5777 </tbody></table> 5778 </div> 5779 <div class='jd-tagdata jd-tagdescr'> 5780 <p> Returns approximate (1 / sqrt(v)). 5781 </p> 5782 5783 <p> See also <a href='rs_math.html#android_rs:rsqrt'>rsqrt</a>(), <a href='rs_math.html#android_rs:half_rsqrt'>half_rsqrt</a>(). 5784 </p> 5785 </div> 5786 </div> 5787 5788 <a name='android_rs:native_sin'></a> 5789 <div class='jd-details'> 5790 <h4 class='jd-details-title'> 5791 <span class='sympad'>native_sin</span> 5792 <span class='normal'>: Approximate sine</span> 5793 </h4> 5794 <div class='jd-details-descr'> 5795 <table class='jd-tagtable'><tbody> 5796 <tr> 5797 <td>float native_sin(float v); 5798 </td> 5799 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5800 </td> 5801 </tr> 5802 <tr> 5803 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_sin(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5804 </td> 5805 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5806 </td> 5807 </tr> 5808 <tr> 5809 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_sin(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5810 </td> 5811 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5812 </td> 5813 </tr> 5814 <tr> 5815 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_sin(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5816 </td> 5817 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5818 </td> 5819 </tr> 5820 </tbody></table> 5821 </div> 5822 <div class='jd-tagdata jd-tagdescr'> 5823 <p> Returns the approximate sine of an angle measured in radians. 5824 </p> 5825 5826 <p> See also <a href='rs_math.html#android_rs:sin'>sin</a>(). 5827 </p> 5828 </div> 5829 </div> 5830 5831 <a name='android_rs:native_sincos'></a> 5832 <div class='jd-details'> 5833 <h4 class='jd-details-title'> 5834 <span class='sympad'>native_sincos</span> 5835 <span class='normal'>: Approximate sine and cosine</span> 5836 </h4> 5837 <div class='jd-details-descr'> 5838 <table class='jd-tagtable'><tbody> 5839 <tr> 5840 <td>float native_sincos(float v, float* cos); 5841 </td> 5842 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5843 </td> 5844 </tr> 5845 <tr> 5846 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_sincos(<a href='rs_value_types.html#android_rs:float2'>float2</a> v, <a href='rs_value_types.html#android_rs:float2'>float2</a>* cos); 5847 </td> 5848 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5849 </td> 5850 </tr> 5851 <tr> 5852 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_sincos(<a href='rs_value_types.html#android_rs:float3'>float3</a> v, <a href='rs_value_types.html#android_rs:float3'>float3</a>* cos); 5853 </td> 5854 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5855 </td> 5856 </tr> 5857 <tr> 5858 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_sincos(<a href='rs_value_types.html#android_rs:float4'>float4</a> v, <a href='rs_value_types.html#android_rs:float4'>float4</a>* cos); 5859 </td> 5860 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5861 </td> 5862 </tr> 5863 </tbody></table> 5864 </div> 5865 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 5866 <table class='jd-tagtable'><tbody> 5867 <tr><th>v</th><td>Incoming value in radians.</td></tr> 5868 <tr><th>cos</th><td>*cos will be set to the cosine value.</td></tr> 5869 </tbody></table> 5870 </div> 5871 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5> 5872 <table class='jd-tagtable'><tbody> 5873 <tr><td>Sine.</td></tr> 5874 </tbody></table> 5875 </div> 5876 <div class='jd-tagdata jd-tagdescr'> 5877 <p> Returns the approximate sine and cosine of a value. 5878 </p> 5879 5880 <p> See also <a href='rs_math.html#android_rs:sincos'>sincos</a>(). 5881 </p> 5882 </div> 5883 </div> 5884 5885 <a name='android_rs:native_sinh'></a> 5886 <div class='jd-details'> 5887 <h4 class='jd-details-title'> 5888 <span class='sympad'>native_sinh</span> 5889 <span class='normal'>: Approximate hyperbolic sine</span> 5890 </h4> 5891 <div class='jd-details-descr'> 5892 <table class='jd-tagtable'><tbody> 5893 <tr> 5894 <td>float native_sinh(float v); 5895 </td> 5896 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5897 </td> 5898 </tr> 5899 <tr> 5900 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_sinh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5901 </td> 5902 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5903 </td> 5904 </tr> 5905 <tr> 5906 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_sinh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5907 </td> 5908 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5909 </td> 5910 </tr> 5911 <tr> 5912 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_sinh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5913 </td> 5914 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5915 </td> 5916 </tr> 5917 </tbody></table> 5918 </div> 5919 <div class='jd-tagdata jd-tagdescr'> 5920 <p> Returns the approximate hyperbolic sine of a value specified in radians. 5921 </p> 5922 5923 <p> See also <a href='rs_math.html#android_rs:sinh'>sinh</a>(). 5924 </p> 5925 </div> 5926 </div> 5927 5928 <a name='android_rs:native_sinpi'></a> 5929 <div class='jd-details'> 5930 <h4 class='jd-details-title'> 5931 <span class='sympad'>native_sinpi</span> 5932 <span class='normal'>: Approximate sine of a number multiplied by pi</span> 5933 </h4> 5934 <div class='jd-details-descr'> 5935 <table class='jd-tagtable'><tbody> 5936 <tr> 5937 <td>float native_sinpi(float v); 5938 </td> 5939 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5940 </td> 5941 </tr> 5942 <tr> 5943 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_sinpi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5944 </td> 5945 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5946 </td> 5947 </tr> 5948 <tr> 5949 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_sinpi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5950 </td> 5951 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5952 </td> 5953 </tr> 5954 <tr> 5955 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_sinpi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 5956 </td> 5957 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5958 </td> 5959 </tr> 5960 </tbody></table> 5961 </div> 5962 <div class='jd-tagdata jd-tagdescr'> 5963 <p> Returns the approximate sine of (v * pi), where (v * pi) is measured in radians. 5964 </p> 5965 5966 <p> To get the sine of a value measured in degrees, call <code>sinpi(v / 180.f)</code>. 5967 </p> 5968 5969 <p> See also <a href='rs_math.html#android_rs:sinpi'>sinpi</a>(). 5970 </p> 5971 </div> 5972 </div> 5973 5974 <a name='android_rs:native_sqrt'></a> 5975 <div class='jd-details'> 5976 <h4 class='jd-details-title'> 5977 <span class='sympad'>native_sqrt</span> 5978 <span class='normal'>: Approximate square root</span> 5979 </h4> 5980 <div class='jd-details-descr'> 5981 <table class='jd-tagtable'><tbody> 5982 <tr> 5983 <td>float native_sqrt(float v); 5984 </td> 5985 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5986 </td> 5987 </tr> 5988 <tr> 5989 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_sqrt(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 5990 </td> 5991 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5992 </td> 5993 </tr> 5994 <tr> 5995 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_sqrt(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 5996 </td> 5997 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5998 </td> 5999 </tr> 6000 <tr> 6001 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_sqrt(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6002 </td> 6003 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6004 </td> 6005 </tr> 6006 </tbody></table> 6007 </div> 6008 <div class='jd-tagdata jd-tagdescr'> 6009 <p> Returns the approximate sqrt(v). 6010 </p> 6011 6012 <p> See also <a href='rs_math.html#android_rs:sqrt'>sqrt</a>(), <a href='rs_math.html#android_rs:half_sqrt'>half_sqrt</a>(). 6013 </p> 6014 </div> 6015 </div> 6016 6017 <a name='android_rs:native_tan'></a> 6018 <div class='jd-details'> 6019 <h4 class='jd-details-title'> 6020 <span class='sympad'>native_tan</span> 6021 <span class='normal'>: Approximate tangent</span> 6022 </h4> 6023 <div class='jd-details-descr'> 6024 <table class='jd-tagtable'><tbody> 6025 <tr> 6026 <td>float native_tan(float v); 6027 </td> 6028 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6029 </td> 6030 </tr> 6031 <tr> 6032 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_tan(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6033 </td> 6034 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6035 </td> 6036 </tr> 6037 <tr> 6038 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_tan(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6039 </td> 6040 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6041 </td> 6042 </tr> 6043 <tr> 6044 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_tan(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6045 </td> 6046 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6047 </td> 6048 </tr> 6049 </tbody></table> 6050 </div> 6051 <div class='jd-tagdata jd-tagdescr'> 6052 <p> Returns the approximate tangent of an angle measured in radians. 6053 </p> 6054 </div> 6055 </div> 6056 6057 <a name='android_rs:native_tanh'></a> 6058 <div class='jd-details'> 6059 <h4 class='jd-details-title'> 6060 <span class='sympad'>native_tanh</span> 6061 <span class='normal'>: Approximate hyperbolic tangent</span> 6062 </h4> 6063 <div class='jd-details-descr'> 6064 <table class='jd-tagtable'><tbody> 6065 <tr> 6066 <td>float native_tanh(float v); 6067 </td> 6068 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6069 </td> 6070 </tr> 6071 <tr> 6072 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_tanh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6073 </td> 6074 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6075 </td> 6076 </tr> 6077 <tr> 6078 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_tanh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6079 </td> 6080 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6081 </td> 6082 </tr> 6083 <tr> 6084 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_tanh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6085 </td> 6086 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6087 </td> 6088 </tr> 6089 </tbody></table> 6090 </div> 6091 <div class='jd-tagdata jd-tagdescr'> 6092 <p> Returns the approximate hyperbolic tangent of a value. 6093 </p> 6094 6095 <p> See also <a href='rs_math.html#android_rs:tanh'>tanh</a>(). 6096 </p> 6097 </div> 6098 </div> 6099 6100 <a name='android_rs:native_tanpi'></a> 6101 <div class='jd-details'> 6102 <h4 class='jd-details-title'> 6103 <span class='sympad'>native_tanpi</span> 6104 <span class='normal'>: Approximate tangent of a number multiplied by pi</span> 6105 </h4> 6106 <div class='jd-details-descr'> 6107 <table class='jd-tagtable'><tbody> 6108 <tr> 6109 <td>float native_tanpi(float v); 6110 </td> 6111 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6112 </td> 6113 </tr> 6114 <tr> 6115 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> native_tanpi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6116 </td> 6117 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6118 </td> 6119 </tr> 6120 <tr> 6121 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> native_tanpi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6122 </td> 6123 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6124 </td> 6125 </tr> 6126 <tr> 6127 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> native_tanpi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6128 </td> 6129 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6130 </td> 6131 </tr> 6132 </tbody></table> 6133 </div> 6134 <div class='jd-tagdata jd-tagdescr'> 6135 <p> Returns the approximate tangent of (v * pi), where (v * pi) is measured in radians. 6136 </p> 6137 6138 <p> To get the tangent of a value measured in degrees, call <code>tanpi(v / 180.f)</code>. 6139 </p> 6140 6141 <p> See also <a href='rs_math.html#android_rs:tanpi'>tanpi</a>(). 6142 </p> 6143 </div> 6144 </div> 6145 6146 <a name='android_rs:nextafter'></a> 6147 <div class='jd-details'> 6148 <h4 class='jd-details-title'> 6149 <span class='sympad'>nextafter</span> 6150 <span class='normal'>: Next floating point number</span> 6151 </h4> 6152 <div class='jd-details-descr'> 6153 <table class='jd-tagtable'><tbody> 6154 <tr> 6155 <td>float nextafter(float v, float target); 6156 </td> 6157 <td> </td> 6158 </tr> 6159 <tr> 6160 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> nextafter(<a href='rs_value_types.html#android_rs:float2'>float2</a> v, <a href='rs_value_types.html#android_rs:float2'>float2</a> target); 6161 </td> 6162 <td> </td> 6163 </tr> 6164 <tr> 6165 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> nextafter(<a href='rs_value_types.html#android_rs:float3'>float3</a> v, <a href='rs_value_types.html#android_rs:float3'>float3</a> target); 6166 </td> 6167 <td> </td> 6168 </tr> 6169 <tr> 6170 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> nextafter(<a href='rs_value_types.html#android_rs:float4'>float4</a> v, <a href='rs_value_types.html#android_rs:float4'>float4</a> target); 6171 </td> 6172 <td> </td> 6173 </tr> 6174 </tbody></table> 6175 </div> 6176 <div class='jd-tagdata jd-tagdescr'> 6177 <p> Returns the next representable floating point number from v towards target. 6178 </p> 6179 6180 <p> In rs_fp_relaxed mode, a denormalized input value may not yield the next denormalized 6181 value, as support of denormalized values is optional in relaxed mode. 6182 </p> 6183 </div> 6184 </div> 6185 6186 <a name='android_rs:pow'></a> 6187 <div class='jd-details'> 6188 <h4 class='jd-details-title'> 6189 <span class='sympad'>pow</span> 6190 <span class='normal'>: Base raised to an exponent</span> 6191 </h4> 6192 <div class='jd-details-descr'> 6193 <table class='jd-tagtable'><tbody> 6194 <tr> 6195 <td>float pow(float base, float exponent); 6196 </td> 6197 <td> </td> 6198 </tr> 6199 <tr> 6200 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> pow(<a href='rs_value_types.html#android_rs:float2'>float2</a> base, <a href='rs_value_types.html#android_rs:float2'>float2</a> exponent); 6201 </td> 6202 <td> </td> 6203 </tr> 6204 <tr> 6205 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> pow(<a href='rs_value_types.html#android_rs:float3'>float3</a> base, <a href='rs_value_types.html#android_rs:float3'>float3</a> exponent); 6206 </td> 6207 <td> </td> 6208 </tr> 6209 <tr> 6210 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> pow(<a href='rs_value_types.html#android_rs:float4'>float4</a> base, <a href='rs_value_types.html#android_rs:float4'>float4</a> exponent); 6211 </td> 6212 <td> </td> 6213 </tr> 6214 </tbody></table> 6215 </div> 6216 <div class='jd-tagdata jd-tagdescr'> 6217 <p> Returns base raised to the power exponent, i.e. base ^ exponent. 6218 </p> 6219 6220 <p> <a href='rs_math.html#android_rs:pown'>pown</a>() and <a href='rs_math.html#android_rs:powr'>powr</a>() are similar. <a href='rs_math.html#android_rs:pown'>pown</a>() takes an integer exponent. <a href='rs_math.html#android_rs:powr'>powr</a>() assumes the 6221 base to be non-negative. 6222 </p> 6223 </div> 6224 </div> 6225 6226 <a name='android_rs:pown'></a> 6227 <div class='jd-details'> 6228 <h4 class='jd-details-title'> 6229 <span class='sympad'>pown</span> 6230 <span class='normal'>: Base raised to an integer exponent</span> 6231 </h4> 6232 <div class='jd-details-descr'> 6233 <table class='jd-tagtable'><tbody> 6234 <tr> 6235 <td>float pown(float base, int exponent); 6236 </td> 6237 <td> </td> 6238 </tr> 6239 <tr> 6240 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> pown(<a href='rs_value_types.html#android_rs:float2'>float2</a> base, <a href='rs_value_types.html#android_rs:int2'>int2</a> exponent); 6241 </td> 6242 <td> </td> 6243 </tr> 6244 <tr> 6245 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> pown(<a href='rs_value_types.html#android_rs:float3'>float3</a> base, <a href='rs_value_types.html#android_rs:int3'>int3</a> exponent); 6246 </td> 6247 <td> </td> 6248 </tr> 6249 <tr> 6250 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> pown(<a href='rs_value_types.html#android_rs:float4'>float4</a> base, <a href='rs_value_types.html#android_rs:int4'>int4</a> exponent); 6251 </td> 6252 <td> </td> 6253 </tr> 6254 </tbody></table> 6255 </div> 6256 <div class='jd-tagdata jd-tagdescr'> 6257 <p> Returns base raised to the power exponent, i.e. base ^ exponent. 6258 </p> 6259 6260 <p> <a href='rs_math.html#android_rs:pow'>pow</a>() and <a href='rs_math.html#android_rs:powr'>powr</a>() are similar. The both take a float exponent. <a href='rs_math.html#android_rs:powr'>powr</a>() also assumes the 6261 base to be non-negative. 6262 </p> 6263 </div> 6264 </div> 6265 6266 <a name='android_rs:powr'></a> 6267 <div class='jd-details'> 6268 <h4 class='jd-details-title'> 6269 <span class='sympad'>powr</span> 6270 <span class='normal'>: Positive base raised to an exponent</span> 6271 </h4> 6272 <div class='jd-details-descr'> 6273 <table class='jd-tagtable'><tbody> 6274 <tr> 6275 <td>float powr(float base, float exponent); 6276 </td> 6277 <td> </td> 6278 </tr> 6279 <tr> 6280 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> powr(<a href='rs_value_types.html#android_rs:float2'>float2</a> base, <a href='rs_value_types.html#android_rs:float2'>float2</a> exponent); 6281 </td> 6282 <td> </td> 6283 </tr> 6284 <tr> 6285 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> powr(<a href='rs_value_types.html#android_rs:float3'>float3</a> base, <a href='rs_value_types.html#android_rs:float3'>float3</a> exponent); 6286 </td> 6287 <td> </td> 6288 </tr> 6289 <tr> 6290 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> powr(<a href='rs_value_types.html#android_rs:float4'>float4</a> base, <a href='rs_value_types.html#android_rs:float4'>float4</a> exponent); 6291 </td> 6292 <td> </td> 6293 </tr> 6294 </tbody></table> 6295 </div> 6296 <div class='jd-tagdata jd-tagdescr'> 6297 <p> Returns base raised to the power exponent, i.e. base ^ exponent. base must be >= 0. 6298 </p> 6299 6300 <p> <a href='rs_math.html#android_rs:pow'>pow</a>() and <a href='rs_math.html#android_rs:pown'>pown</a>() are similar. They both make no assumptions about the base. 6301 <a href='rs_math.html#android_rs:pow'>pow</a>() takes a float exponent while <a href='rs_math.html#android_rs:pown'>pown</a>() take an integer. 6302 </p> 6303 6304 <p> See also <a href='rs_math.html#android_rs:native_powr'>native_powr</a>(). 6305 </p> 6306 </div> 6307 </div> 6308 6309 <a name='android_rs:radians'></a> 6310 <div class='jd-details'> 6311 <h4 class='jd-details-title'> 6312 <span class='sympad'>radians</span> 6313 <span class='normal'>: Converts degrees into radians</span> 6314 </h4> 6315 <div class='jd-details-descr'> 6316 <table class='jd-tagtable'><tbody> 6317 <tr> 6318 <td>float radians(float v); 6319 </td> 6320 <td> </td> 6321 </tr> 6322 <tr> 6323 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> radians(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6324 </td> 6325 <td> </td> 6326 </tr> 6327 <tr> 6328 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> radians(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6329 </td> 6330 <td> </td> 6331 </tr> 6332 <tr> 6333 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> radians(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6334 </td> 6335 <td> </td> 6336 </tr> 6337 </tbody></table> 6338 </div> 6339 <div class='jd-tagdata jd-tagdescr'> 6340 <p> Converts from degrees to radians. 6341 </p> 6342 </div> 6343 </div> 6344 6345 <a name='android_rs:remainder'></a> 6346 <div class='jd-details'> 6347 <h4 class='jd-details-title'> 6348 <span class='sympad'>remainder</span> 6349 <span class='normal'>: Remainder of a division</span> 6350 </h4> 6351 <div class='jd-details-descr'> 6352 <table class='jd-tagtable'><tbody> 6353 <tr> 6354 <td>float remainder(float numerator, float denominator); 6355 </td> 6356 <td> </td> 6357 </tr> 6358 <tr> 6359 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> remainder(<a href='rs_value_types.html#android_rs:float2'>float2</a> numerator, <a href='rs_value_types.html#android_rs:float2'>float2</a> denominator); 6360 </td> 6361 <td> </td> 6362 </tr> 6363 <tr> 6364 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> remainder(<a href='rs_value_types.html#android_rs:float3'>float3</a> numerator, <a href='rs_value_types.html#android_rs:float3'>float3</a> denominator); 6365 </td> 6366 <td> </td> 6367 </tr> 6368 <tr> 6369 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> remainder(<a href='rs_value_types.html#android_rs:float4'>float4</a> numerator, <a href='rs_value_types.html#android_rs:float4'>float4</a> denominator); 6370 </td> 6371 <td> </td> 6372 </tr> 6373 </tbody></table> 6374 </div> 6375 <div class='jd-tagdata jd-tagdescr'> 6376 <p> Returns the remainder of (numerator / denominator), where the quotient is rounded towards 6377 the nearest integer. 6378 </p> 6379 6380 <p> The function <a href='rs_math.html#android_rs:fmod'>fmod</a>() is similar but rounds toward the closest interger. 6381 For example, <code><a href='rs_math.html#android_rs:fmod'>fmod</a>(-3.8f, 2.f)</code> returns -1.8f (-3.8f - -1.f * 2.f) 6382 while <code>remainder(-3.8f, 2.f)</code> returns 0.2f (-3.8f - -2.f * 2.f). 6383 </p> 6384 </div> 6385 </div> 6386 6387 <a name='android_rs:remquo'></a> 6388 <div class='jd-details'> 6389 <h4 class='jd-details-title'> 6390 <span class='sympad'>remquo</span> 6391 <span class='normal'>: Remainder and quotient of a division</span> 6392 </h4> 6393 <div class='jd-details-descr'> 6394 <table class='jd-tagtable'><tbody> 6395 <tr> 6396 <td>float remquo(float numerator, float denominator, int* quotient); 6397 </td> 6398 <td> </td> 6399 </tr> 6400 <tr> 6401 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> remquo(<a href='rs_value_types.html#android_rs:float2'>float2</a> numerator, <a href='rs_value_types.html#android_rs:float2'>float2</a> denominator, <a href='rs_value_types.html#android_rs:int2'>int2</a>* quotient); 6402 </td> 6403 <td> </td> 6404 </tr> 6405 <tr> 6406 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> remquo(<a href='rs_value_types.html#android_rs:float3'>float3</a> numerator, <a href='rs_value_types.html#android_rs:float3'>float3</a> denominator, <a href='rs_value_types.html#android_rs:int3'>int3</a>* quotient); 6407 </td> 6408 <td> </td> 6409 </tr> 6410 <tr> 6411 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> remquo(<a href='rs_value_types.html#android_rs:float4'>float4</a> numerator, <a href='rs_value_types.html#android_rs:float4'>float4</a> denominator, <a href='rs_value_types.html#android_rs:int4'>int4</a>* quotient); 6412 </td> 6413 <td> </td> 6414 </tr> 6415 </tbody></table> 6416 </div> 6417 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 6418 <table class='jd-tagtable'><tbody> 6419 <tr><th>numerator</th><td>Numerator.</td></tr> 6420 <tr><th>denominator</th><td>Denominator.</td></tr> 6421 <tr><th>quotient</th><td>*quotient will be set to the integer quotient.</td></tr> 6422 </tbody></table> 6423 </div> 6424 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5> 6425 <table class='jd-tagtable'><tbody> 6426 <tr><td>Remainder, precise only for the low three bits.</td></tr> 6427 </tbody></table> 6428 </div> 6429 <div class='jd-tagdata jd-tagdescr'> 6430 <p> Returns the quotient and the remainder of (numerator / denominator). 6431 </p> 6432 6433 <p> Only the sign and lowest three bits of the quotient are guaranteed to be accurate. 6434 </p> 6435 6436 <p> This function is useful for implementing periodic functions. The low three bits of the 6437 quotient gives the quadrant and the remainder the distance within the quadrant. 6438 For example, an implementation of <a href='rs_math.html#android_rs:sin'>sin</a>(x) could call <code>remquo(x, PI / 2.f, &quadrant)</code> 6439 to reduce very large value of x to something within a limited range. 6440 </p> 6441 6442 <p> Example: <code>remquo(-23.5f, 8.f, &quot)</code> sets the lowest three bits of quot to 3 6443 and the sign negative. It returns 0.5f. 6444 </p> 6445 </div> 6446 </div> 6447 6448 <a name='android_rs:rint'></a> 6449 <div class='jd-details'> 6450 <h4 class='jd-details-title'> 6451 <span class='sympad'>rint</span> 6452 <span class='normal'>: Round to even</span> 6453 </h4> 6454 <div class='jd-details-descr'> 6455 <table class='jd-tagtable'><tbody> 6456 <tr> 6457 <td>float rint(float v); 6458 </td> 6459 <td> </td> 6460 </tr> 6461 <tr> 6462 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> rint(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6463 </td> 6464 <td> </td> 6465 </tr> 6466 <tr> 6467 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> rint(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6468 </td> 6469 <td> </td> 6470 </tr> 6471 <tr> 6472 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> rint(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6473 </td> 6474 <td> </td> 6475 </tr> 6476 </tbody></table> 6477 </div> 6478 <div class='jd-tagdata jd-tagdescr'> 6479 <p> Rounds to the nearest integral value. 6480 </p> 6481 6482 <p> rint() rounds half values to even. For example, <code>rint(0.5f)</code> returns 0.f and 6483 <code>rint(1.5f)</code> returns 2.f. Similarly, <code>rint(-0.5f)</code> returns -0.f and 6484 <code>rint(-1.5f)</code> returns -2.f. 6485 </p> 6486 6487 <p> <a href='rs_math.html#android_rs:round'>round</a>() is similar but rounds away from zero. <a href='rs_math.html#android_rs:trunc'>trunc</a>() truncates the decimal fraction. 6488 </p> 6489 </div> 6490 </div> 6491 6492 <a name='android_rs:rootn'></a> 6493 <div class='jd-details'> 6494 <h4 class='jd-details-title'> 6495 <span class='sympad'>rootn</span> 6496 <span class='normal'>: Nth root</span> 6497 </h4> 6498 <div class='jd-details-descr'> 6499 <table class='jd-tagtable'><tbody> 6500 <tr> 6501 <td>float rootn(float v, int n); 6502 </td> 6503 <td> </td> 6504 </tr> 6505 <tr> 6506 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> rootn(<a href='rs_value_types.html#android_rs:float2'>float2</a> v, <a href='rs_value_types.html#android_rs:int2'>int2</a> n); 6507 </td> 6508 <td> </td> 6509 </tr> 6510 <tr> 6511 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> rootn(<a href='rs_value_types.html#android_rs:float3'>float3</a> v, <a href='rs_value_types.html#android_rs:int3'>int3</a> n); 6512 </td> 6513 <td> </td> 6514 </tr> 6515 <tr> 6516 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> rootn(<a href='rs_value_types.html#android_rs:float4'>float4</a> v, <a href='rs_value_types.html#android_rs:int4'>int4</a> n); 6517 </td> 6518 <td> </td> 6519 </tr> 6520 </tbody></table> 6521 </div> 6522 <div class='jd-tagdata jd-tagdescr'> 6523 <p> Compute the Nth root of a value. 6524 </p> 6525 6526 <p> See also <a href='rs_math.html#android_rs:native_rootn'>native_rootn</a>(). 6527 </p> 6528 </div> 6529 </div> 6530 6531 <a name='android_rs:round'></a> 6532 <div class='jd-details'> 6533 <h4 class='jd-details-title'> 6534 <span class='sympad'>round</span> 6535 <span class='normal'>: Round away from zero</span> 6536 </h4> 6537 <div class='jd-details-descr'> 6538 <table class='jd-tagtable'><tbody> 6539 <tr> 6540 <td>float round(float v); 6541 </td> 6542 <td> </td> 6543 </tr> 6544 <tr> 6545 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> round(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6546 </td> 6547 <td> </td> 6548 </tr> 6549 <tr> 6550 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> round(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6551 </td> 6552 <td> </td> 6553 </tr> 6554 <tr> 6555 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> round(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6556 </td> 6557 <td> </td> 6558 </tr> 6559 </tbody></table> 6560 </div> 6561 <div class='jd-tagdata jd-tagdescr'> 6562 <p> Round to the nearest integral value. 6563 </p> 6564 6565 <p> round() rounds half values away from zero. For example, <code>round(0.5f)</code> returns 1.f 6566 and <code>round(1.5f)</code> returns 2.f. Similarly, <code>round(-0.5f)</code> returns -1.f 6567 and <code>round(-1.5f)</code> returns -2.f. 6568 </p> 6569 6570 <p> <a href='rs_math.html#android_rs:rint'>rint</a>() is similar but rounds half values toward even. <a href='rs_math.html#android_rs:trunc'>trunc</a>() truncates the decimal fraction. 6571 </p> 6572 </div> 6573 </div> 6574 6575 <a name='android_rs:rsClamp'></a> 6576 <div class='jd-details'> 6577 <h4 class='jd-details-title'> 6578 <span class='sympad'>rsClamp</span> 6579 <span class='normal'>: Restrain a value to a range</span> 6580 </h4> 6581 <div class='jd-details-descr'> 6582 <table class='jd-tagtable'><tbody> 6583 <tr> 6584 <td>char rsClamp(char amount, char low, char high); 6585 </td> 6586 <td> </td> 6587 </tr> 6588 <tr> 6589 <td>int rsClamp(int amount, int low, int high); 6590 </td> 6591 <td> </td> 6592 </tr> 6593 <tr> 6594 <td>short rsClamp(short amount, short low, short high); 6595 </td> 6596 <td> </td> 6597 </tr> 6598 <tr> 6599 <td><a href='rs_value_types.html#android_rs:uchar'>uchar</a> rsClamp(<a href='rs_value_types.html#android_rs:uchar'>uchar</a> amount, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> low, <a href='rs_value_types.html#android_rs:uchar'>uchar</a> high); 6600 </td> 6601 <td> </td> 6602 </tr> 6603 <tr> 6604 <td><a href='rs_value_types.html#android_rs:uint'>uint</a> rsClamp(<a href='rs_value_types.html#android_rs:uint'>uint</a> amount, <a href='rs_value_types.html#android_rs:uint'>uint</a> low, <a href='rs_value_types.html#android_rs:uint'>uint</a> high); 6605 </td> 6606 <td> </td> 6607 </tr> 6608 <tr> 6609 <td><a href='rs_value_types.html#android_rs:ushort'>ushort</a> rsClamp(<a href='rs_value_types.html#android_rs:ushort'>ushort</a> amount, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> low, <a href='rs_value_types.html#android_rs:ushort'>ushort</a> high); 6610 </td> 6611 <td> </td> 6612 </tr> 6613 </tbody></table> 6614 </div> 6615 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 6616 <table class='jd-tagtable'><tbody> 6617 <tr><th>amount</th><td>Value to clamp.</td></tr> 6618 <tr><th>low</th><td>Lower bound.</td></tr> 6619 <tr><th>high</th><td>Upper bound.</td></tr> 6620 </tbody></table> 6621 </div> 6622 <div class='jd-tagdata jd-tagdescr'> 6623 <p><b>Deprecated.</b> Use <a href='rs_math.html#android_rs:clamp'>clamp</a>() instead.</p> 6624 <p> Clamp a value between low and high. 6625 </p> 6626 </div> 6627 </div> 6628 6629 <a name='android_rs:rsFrac'></a> 6630 <div class='jd-details'> 6631 <h4 class='jd-details-title'> 6632 <span class='sympad'>rsFrac</span> 6633 <span class='normal'>: Returns the fractional part of a float</span> 6634 </h4> 6635 <div class='jd-details-descr'> 6636 <table class='jd-tagtable'><tbody> 6637 <tr> 6638 <td>float rsFrac(float v); 6639 </td> 6640 <td> </td> 6641 </tr> 6642 </tbody></table> 6643 </div> 6644 <div class='jd-tagdata jd-tagdescr'> 6645 <p><b>Deprecated.</b> Use <a href='rs_math.html#android_rs:fract'>fract</a>() instead.</p> 6646 <p> Returns the fractional part of a float 6647 </p> 6648 </div> 6649 </div> 6650 6651 <a name='android_rs:rsRand'></a> 6652 <div class='jd-details'> 6653 <h4 class='jd-details-title'> 6654 <span class='sympad'>rsRand</span> 6655 <span class='normal'>: Pseudo-random number</span> 6656 </h4> 6657 <div class='jd-details-descr'> 6658 <table class='jd-tagtable'><tbody> 6659 <tr> 6660 <td>float rsRand(float max_value); 6661 </td> 6662 <td> </td> 6663 </tr> 6664 <tr> 6665 <td>float rsRand(float min_value, float max_value); 6666 </td> 6667 <td> </td> 6668 </tr> 6669 <tr> 6670 <td>int rsRand(int max_value); 6671 </td> 6672 <td> </td> 6673 </tr> 6674 <tr> 6675 <td>int rsRand(int min_value, int max_value); 6676 </td> 6677 <td> </td> 6678 </tr> 6679 </tbody></table> 6680 </div> 6681 <div class='jd-tagdata jd-tagdescr'> 6682 <p> Return a random value between 0 (or min_value) and max_malue. 6683 </p> 6684 </div> 6685 </div> 6686 6687 <a name='android_rs:rsqrt'></a> 6688 <div class='jd-details'> 6689 <h4 class='jd-details-title'> 6690 <span class='sympad'>rsqrt</span> 6691 <span class='normal'>: Reciprocal of a square root</span> 6692 </h4> 6693 <div class='jd-details-descr'> 6694 <table class='jd-tagtable'><tbody> 6695 <tr> 6696 <td>float rsqrt(float v); 6697 </td> 6698 <td> </td> 6699 </tr> 6700 <tr> 6701 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> rsqrt(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6702 </td> 6703 <td> </td> 6704 </tr> 6705 <tr> 6706 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> rsqrt(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6707 </td> 6708 <td> </td> 6709 </tr> 6710 <tr> 6711 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> rsqrt(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6712 </td> 6713 <td> </td> 6714 </tr> 6715 </tbody></table> 6716 </div> 6717 <div class='jd-tagdata jd-tagdescr'> 6718 <p> Returns (1 / sqrt(v)). 6719 </p> 6720 6721 <p> See also <a href='rs_math.html#android_rs:half_rsqrt'>half_rsqrt</a>(), <a href='rs_math.html#android_rs:native_rsqrt'>native_rsqrt</a>(). 6722 </p> 6723 </div> 6724 </div> 6725 6726 <a name='android_rs:sign'></a> 6727 <div class='jd-details'> 6728 <h4 class='jd-details-title'> 6729 <span class='sympad'>sign</span> 6730 <span class='normal'>: Sign of a value</span> 6731 </h4> 6732 <div class='jd-details-descr'> 6733 <table class='jd-tagtable'><tbody> 6734 <tr> 6735 <td>float sign(float v); 6736 </td> 6737 <td> </td> 6738 </tr> 6739 <tr> 6740 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> sign(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6741 </td> 6742 <td> </td> 6743 </tr> 6744 <tr> 6745 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> sign(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6746 </td> 6747 <td> </td> 6748 </tr> 6749 <tr> 6750 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> sign(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6751 </td> 6752 <td> </td> 6753 </tr> 6754 </tbody></table> 6755 </div> 6756 <div class='jd-tagdata jd-tagdescr'> 6757 <p> Returns the sign of a value. 6758 </p> 6759 6760 <p> if (v < 0) return -1.f; 6761 else if (v > 0) return 1.f; 6762 else return 0.f; 6763 </p> 6764 </div> 6765 </div> 6766 6767 <a name='android_rs:sin'></a> 6768 <div class='jd-details'> 6769 <h4 class='jd-details-title'> 6770 <span class='sympad'>sin</span> 6771 <span class='normal'>: Sine</span> 6772 </h4> 6773 <div class='jd-details-descr'> 6774 <table class='jd-tagtable'><tbody> 6775 <tr> 6776 <td>float sin(float v); 6777 </td> 6778 <td> </td> 6779 </tr> 6780 <tr> 6781 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> sin(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6782 </td> 6783 <td> </td> 6784 </tr> 6785 <tr> 6786 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> sin(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6787 </td> 6788 <td> </td> 6789 </tr> 6790 <tr> 6791 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> sin(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6792 </td> 6793 <td> </td> 6794 </tr> 6795 </tbody></table> 6796 </div> 6797 <div class='jd-tagdata jd-tagdescr'> 6798 <p> Returns the sine of an angle measured in radians. 6799 </p> 6800 6801 <p> See also <a href='rs_math.html#android_rs:native_sin'>native_sin</a>(). 6802 </p> 6803 </div> 6804 </div> 6805 6806 <a name='android_rs:sincos'></a> 6807 <div class='jd-details'> 6808 <h4 class='jd-details-title'> 6809 <span class='sympad'>sincos</span> 6810 <span class='normal'>: Sine and cosine</span> 6811 </h4> 6812 <div class='jd-details-descr'> 6813 <table class='jd-tagtable'><tbody> 6814 <tr> 6815 <td>float sincos(float v, float* cos); 6816 </td> 6817 <td> </td> 6818 </tr> 6819 <tr> 6820 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> sincos(<a href='rs_value_types.html#android_rs:float2'>float2</a> v, <a href='rs_value_types.html#android_rs:float2'>float2</a>* cos); 6821 </td> 6822 <td> </td> 6823 </tr> 6824 <tr> 6825 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> sincos(<a href='rs_value_types.html#android_rs:float3'>float3</a> v, <a href='rs_value_types.html#android_rs:float3'>float3</a>* cos); 6826 </td> 6827 <td> </td> 6828 </tr> 6829 <tr> 6830 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> sincos(<a href='rs_value_types.html#android_rs:float4'>float4</a> v, <a href='rs_value_types.html#android_rs:float4'>float4</a>* cos); 6831 </td> 6832 <td> </td> 6833 </tr> 6834 </tbody></table> 6835 </div> 6836 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 6837 <table class='jd-tagtable'><tbody> 6838 <tr><th>v</th><td>Incoming value in radians.</td></tr> 6839 <tr><th>cos</th><td>*cos will be set to the cosine value.</td></tr> 6840 </tbody></table> 6841 </div> 6842 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5> 6843 <table class='jd-tagtable'><tbody> 6844 <tr><td>Sine of v.</td></tr> 6845 </tbody></table> 6846 </div> 6847 <div class='jd-tagdata jd-tagdescr'> 6848 <p> Returns the sine and cosine of a value. 6849 </p> 6850 6851 <p> See also <a href='rs_math.html#android_rs:native_sincos'>native_sincos</a>(). 6852 </p> 6853 </div> 6854 </div> 6855 6856 <a name='android_rs:sinh'></a> 6857 <div class='jd-details'> 6858 <h4 class='jd-details-title'> 6859 <span class='sympad'>sinh</span> 6860 <span class='normal'>: Hyperbolic sine</span> 6861 </h4> 6862 <div class='jd-details-descr'> 6863 <table class='jd-tagtable'><tbody> 6864 <tr> 6865 <td>float sinh(float v); 6866 </td> 6867 <td> </td> 6868 </tr> 6869 <tr> 6870 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> sinh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6871 </td> 6872 <td> </td> 6873 </tr> 6874 <tr> 6875 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> sinh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6876 </td> 6877 <td> </td> 6878 </tr> 6879 <tr> 6880 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> sinh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6881 </td> 6882 <td> </td> 6883 </tr> 6884 </tbody></table> 6885 </div> 6886 <div class='jd-tagdata jd-tagdescr'> 6887 <p> Returns the hyperbolic sine of v, where v is measured in radians. 6888 </p> 6889 6890 <p> See also <a href='rs_math.html#android_rs:native_sinh'>native_sinh</a>(). 6891 </p> 6892 </div> 6893 </div> 6894 6895 <a name='android_rs:sinpi'></a> 6896 <div class='jd-details'> 6897 <h4 class='jd-details-title'> 6898 <span class='sympad'>sinpi</span> 6899 <span class='normal'>: Sine of a number multiplied by pi</span> 6900 </h4> 6901 <div class='jd-details-descr'> 6902 <table class='jd-tagtable'><tbody> 6903 <tr> 6904 <td>float sinpi(float v); 6905 </td> 6906 <td> </td> 6907 </tr> 6908 <tr> 6909 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> sinpi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6910 </td> 6911 <td> </td> 6912 </tr> 6913 <tr> 6914 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> sinpi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6915 </td> 6916 <td> </td> 6917 </tr> 6918 <tr> 6919 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> sinpi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6920 </td> 6921 <td> </td> 6922 </tr> 6923 </tbody></table> 6924 </div> 6925 <div class='jd-tagdata jd-tagdescr'> 6926 <p> Returns the sine of (v * pi), where (v * pi) is measured in radians. 6927 </p> 6928 6929 <p> To get the sine of a value measured in degrees, call <code>sinpi(v / 180.f)</code>. 6930 </p> 6931 6932 <p> See also <a href='rs_math.html#android_rs:native_sinpi'>native_sinpi</a>(). 6933 </p> 6934 </div> 6935 </div> 6936 6937 <a name='android_rs:sqrt'></a> 6938 <div class='jd-details'> 6939 <h4 class='jd-details-title'> 6940 <span class='sympad'>sqrt</span> 6941 <span class='normal'>: Square root</span> 6942 </h4> 6943 <div class='jd-details-descr'> 6944 <table class='jd-tagtable'><tbody> 6945 <tr> 6946 <td>float sqrt(float v); 6947 </td> 6948 <td> </td> 6949 </tr> 6950 <tr> 6951 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> sqrt(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6952 </td> 6953 <td> </td> 6954 </tr> 6955 <tr> 6956 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> sqrt(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 6957 </td> 6958 <td> </td> 6959 </tr> 6960 <tr> 6961 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> sqrt(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 6962 </td> 6963 <td> </td> 6964 </tr> 6965 </tbody></table> 6966 </div> 6967 <div class='jd-tagdata jd-tagdescr'> 6968 <p> Returns the square root of a value. 6969 </p> 6970 6971 <p> See also <a href='rs_math.html#android_rs:half_sqrt'>half_sqrt</a>(), <a href='rs_math.html#android_rs:native_sqrt'>native_sqrt</a>(). 6972 </p> 6973 </div> 6974 </div> 6975 6976 <a name='android_rs:step'></a> 6977 <div class='jd-details'> 6978 <h4 class='jd-details-title'> 6979 <span class='sympad'>step</span> 6980 <span class='normal'>: 0 if less than a value, 0 otherwise</span> 6981 </h4> 6982 <div class='jd-details-descr'> 6983 <table class='jd-tagtable'><tbody> 6984 <tr> 6985 <td>float step(float edge, float v); 6986 </td> 6987 <td> </td> 6988 </tr> 6989 <tr> 6990 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> step(float edge, <a href='rs_value_types.html#android_rs:float2'>float2</a> v); 6991 </td> 6992 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6993 </td> 6994 </tr> 6995 <tr> 6996 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> step(<a href='rs_value_types.html#android_rs:float2'>float2</a> edge, float v); 6997 </td> 6998 <td> </td> 6999 </tr> 7000 <tr> 7001 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> step(<a href='rs_value_types.html#android_rs:float2'>float2</a> edge, <a href='rs_value_types.html#android_rs:float2'>float2</a> v); 7002 </td> 7003 <td> </td> 7004 </tr> 7005 <tr> 7006 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> step(float edge, <a href='rs_value_types.html#android_rs:float3'>float3</a> v); 7007 </td> 7008 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 7009 </td> 7010 </tr> 7011 <tr> 7012 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> step(<a href='rs_value_types.html#android_rs:float3'>float3</a> edge, float v); 7013 </td> 7014 <td> </td> 7015 </tr> 7016 <tr> 7017 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> step(<a href='rs_value_types.html#android_rs:float3'>float3</a> edge, <a href='rs_value_types.html#android_rs:float3'>float3</a> v); 7018 </td> 7019 <td> </td> 7020 </tr> 7021 <tr> 7022 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> step(float edge, <a href='rs_value_types.html#android_rs:float4'>float4</a> v); 7023 </td> 7024 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 7025 </td> 7026 </tr> 7027 <tr> 7028 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> step(<a href='rs_value_types.html#android_rs:float4'>float4</a> edge, float v); 7029 </td> 7030 <td> </td> 7031 </tr> 7032 <tr> 7033 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> step(<a href='rs_value_types.html#android_rs:float4'>float4</a> edge, <a href='rs_value_types.html#android_rs:float4'>float4</a> v); 7034 </td> 7035 <td> </td> 7036 </tr> 7037 </tbody></table> 7038 </div> 7039 <div class='jd-tagdata jd-tagdescr'> 7040 <p> Returns 0.f if v < edge, 1.f otherwise. 7041 </p> 7042 7043 <p> This can be useful to create conditional computations without using loops and branching 7044 instructions. For example, instead of computing <code>(a[i] < b[i]) ? 0.f : <a href='rs_math.html#android_rs:atan2'>atan2</a>(a[i], b[i])</code> 7045 for the corresponding elements of a vector, you could instead use <code>step(a, b) * <a href='rs_math.html#android_rs:atan2'>atan2</a>(a, b)</code>. 7046 </p> 7047 </div> 7048 </div> 7049 7050 <a name='android_rs:tan'></a> 7051 <div class='jd-details'> 7052 <h4 class='jd-details-title'> 7053 <span class='sympad'>tan</span> 7054 <span class='normal'>: Tangent</span> 7055 </h4> 7056 <div class='jd-details-descr'> 7057 <table class='jd-tagtable'><tbody> 7058 <tr> 7059 <td>float tan(float v); 7060 </td> 7061 <td> </td> 7062 </tr> 7063 <tr> 7064 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> tan(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 7065 </td> 7066 <td> </td> 7067 </tr> 7068 <tr> 7069 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> tan(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 7070 </td> 7071 <td> </td> 7072 </tr> 7073 <tr> 7074 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> tan(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 7075 </td> 7076 <td> </td> 7077 </tr> 7078 </tbody></table> 7079 </div> 7080 <div class='jd-tagdata jd-tagdescr'> 7081 <p> Returns the tangent of an angle measured in radians. 7082 </p> 7083 7084 <p> See also <a href='rs_math.html#android_rs:native_tan'>native_tan</a>(). 7085 </p> 7086 </div> 7087 </div> 7088 7089 <a name='android_rs:tanh'></a> 7090 <div class='jd-details'> 7091 <h4 class='jd-details-title'> 7092 <span class='sympad'>tanh</span> 7093 <span class='normal'>: Hyperbolic tangent</span> 7094 </h4> 7095 <div class='jd-details-descr'> 7096 <table class='jd-tagtable'><tbody> 7097 <tr> 7098 <td>float tanh(float v); 7099 </td> 7100 <td> </td> 7101 </tr> 7102 <tr> 7103 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> tanh(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 7104 </td> 7105 <td> </td> 7106 </tr> 7107 <tr> 7108 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> tanh(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 7109 </td> 7110 <td> </td> 7111 </tr> 7112 <tr> 7113 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> tanh(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 7114 </td> 7115 <td> </td> 7116 </tr> 7117 </tbody></table> 7118 </div> 7119 <div class='jd-tagdata jd-tagdescr'> 7120 <p> Returns the hyperbolic tangent of a value. 7121 </p> 7122 7123 <p> See also <a href='rs_math.html#android_rs:native_tanh'>native_tanh</a>(). 7124 </p> 7125 </div> 7126 </div> 7127 7128 <a name='android_rs:tanpi'></a> 7129 <div class='jd-details'> 7130 <h4 class='jd-details-title'> 7131 <span class='sympad'>tanpi</span> 7132 <span class='normal'>: Tangent of a number multiplied by pi</span> 7133 </h4> 7134 <div class='jd-details-descr'> 7135 <table class='jd-tagtable'><tbody> 7136 <tr> 7137 <td>float tanpi(float v); 7138 </td> 7139 <td> </td> 7140 </tr> 7141 <tr> 7142 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> tanpi(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 7143 </td> 7144 <td> </td> 7145 </tr> 7146 <tr> 7147 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> tanpi(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 7148 </td> 7149 <td> </td> 7150 </tr> 7151 <tr> 7152 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> tanpi(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 7153 </td> 7154 <td> </td> 7155 </tr> 7156 </tbody></table> 7157 </div> 7158 <div class='jd-tagdata jd-tagdescr'> 7159 <p> Returns the tangent of (v * pi), where (v * pi) is measured in radians. 7160 </p> 7161 7162 <p> To get the tangent of a value measured in degrees, call <code>tanpi(v / 180.f)</code>. 7163 </p> 7164 7165 <p> See also <a href='rs_math.html#android_rs:native_tanpi'>native_tanpi</a>(). 7166 </p> 7167 </div> 7168 </div> 7169 7170 <a name='android_rs:tgamma'></a> 7171 <div class='jd-details'> 7172 <h4 class='jd-details-title'> 7173 <span class='sympad'>tgamma</span> 7174 <span class='normal'>: Gamma function</span> 7175 </h4> 7176 <div class='jd-details-descr'> 7177 <table class='jd-tagtable'><tbody> 7178 <tr> 7179 <td>float tgamma(float v); 7180 </td> 7181 <td> </td> 7182 </tr> 7183 <tr> 7184 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> tgamma(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 7185 </td> 7186 <td> </td> 7187 </tr> 7188 <tr> 7189 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> tgamma(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 7190 </td> 7191 <td> </td> 7192 </tr> 7193 <tr> 7194 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> tgamma(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 7195 </td> 7196 <td> </td> 7197 </tr> 7198 </tbody></table> 7199 </div> 7200 <div class='jd-tagdata jd-tagdescr'> 7201 <p> Returns the gamma function of a value. 7202 </p> 7203 7204 <p> See also <a href='rs_math.html#android_rs:lgamma'>lgamma</a>(). 7205 </p> 7206 </div> 7207 </div> 7208 7209 <a name='android_rs:trunc'></a> 7210 <div class='jd-details'> 7211 <h4 class='jd-details-title'> 7212 <span class='sympad'>trunc</span> 7213 <span class='normal'>: Truncates a floating point</span> 7214 </h4> 7215 <div class='jd-details-descr'> 7216 <table class='jd-tagtable'><tbody> 7217 <tr> 7218 <td>float trunc(float v); 7219 </td> 7220 <td> </td> 7221 </tr> 7222 <tr> 7223 <td><a href='rs_value_types.html#android_rs:float2'>float2</a> trunc(<a href='rs_value_types.html#android_rs:float2'>float2</a> v); 7224 </td> 7225 <td> </td> 7226 </tr> 7227 <tr> 7228 <td><a href='rs_value_types.html#android_rs:float3'>float3</a> trunc(<a href='rs_value_types.html#android_rs:float3'>float3</a> v); 7229 </td> 7230 <td> </td> 7231 </tr> 7232 <tr> 7233 <td><a href='rs_value_types.html#android_rs:float4'>float4</a> trunc(<a href='rs_value_types.html#android_rs:float4'>float4</a> v); 7234 </td> 7235 <td> </td> 7236 </tr> 7237 </tbody></table> 7238 </div> 7239 <div class='jd-tagdata jd-tagdescr'> 7240 <p> Rounds to integral using truncation. 7241 </p> 7242 7243 <p> For example, <code>trunc(1.7f)</code> returns 1.f and <code>trunc(-1.7f)</code> returns -1.f. 7244 </p> 7245 7246 <p> See <a href='rs_math.html#android_rs:rint'>rint</a>() and <a href='rs_math.html#android_rs:round'>round</a>() for other rounding options. 7247 </p> 7248 </div> 7249 </div> 7250 7251 </div> 7252