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, float b); 3972 </td> 3973 <td> </td> 3974 </tr> 3975 <tr> 3976 <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); 3977 </td> 3978 <td> </td> 3979 </tr> 3980 <tr> 3981 <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, float b); 3982 </td> 3983 <td> </td> 3984 </tr> 3985 <tr> 3986 <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); 3987 </td> 3988 <td> </td> 3989 </tr> 3990 <tr> 3991 <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, float b); 3992 </td> 3993 <td> </td> 3994 </tr> 3995 <tr> 3996 <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); 3997 </td> 3998 <td> </td> 3999 </tr> 4000 <tr> 4001 <td>int max(int a, int b); 4002 </td> 4003 <td> </td> 4004 </tr> 4005 <tr> 4006 <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); 4007 </td> 4008 <td> </td> 4009 </tr> 4010 <tr> 4011 <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); 4012 </td> 4013 <td> </td> 4014 </tr> 4015 <tr> 4016 <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); 4017 </td> 4018 <td> </td> 4019 </tr> 4020 <tr> 4021 <td>long max(long a, long b); 4022 </td> 4023 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4024 </td> 4025 </tr> 4026 <tr> 4027 <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); 4028 </td> 4029 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4030 </td> 4031 </tr> 4032 <tr> 4033 <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); 4034 </td> 4035 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4036 </td> 4037 </tr> 4038 <tr> 4039 <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); 4040 </td> 4041 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4042 </td> 4043 </tr> 4044 <tr> 4045 <td>short max(short a, short b); 4046 </td> 4047 <td> </td> 4048 </tr> 4049 <tr> 4050 <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); 4051 </td> 4052 <td> </td> 4053 </tr> 4054 <tr> 4055 <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); 4056 </td> 4057 <td> </td> 4058 </tr> 4059 <tr> 4060 <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); 4061 </td> 4062 <td> </td> 4063 </tr> 4064 <tr> 4065 <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); 4066 </td> 4067 <td> </td> 4068 </tr> 4069 <tr> 4070 <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); 4071 </td> 4072 <td> </td> 4073 </tr> 4074 <tr> 4075 <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); 4076 </td> 4077 <td> </td> 4078 </tr> 4079 <tr> 4080 <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); 4081 </td> 4082 <td> </td> 4083 </tr> 4084 <tr> 4085 <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); 4086 </td> 4087 <td> </td> 4088 </tr> 4089 <tr> 4090 <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); 4091 </td> 4092 <td> </td> 4093 </tr> 4094 <tr> 4095 <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); 4096 </td> 4097 <td> </td> 4098 </tr> 4099 <tr> 4100 <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); 4101 </td> 4102 <td> </td> 4103 </tr> 4104 <tr> 4105 <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); 4106 </td> 4107 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4108 </td> 4109 </tr> 4110 <tr> 4111 <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); 4112 </td> 4113 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4114 </td> 4115 </tr> 4116 <tr> 4117 <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); 4118 </td> 4119 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4120 </td> 4121 </tr> 4122 <tr> 4123 <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); 4124 </td> 4125 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4126 </td> 4127 </tr> 4128 <tr> 4129 <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); 4130 </td> 4131 <td> </td> 4132 </tr> 4133 <tr> 4134 <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); 4135 </td> 4136 <td> </td> 4137 </tr> 4138 <tr> 4139 <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); 4140 </td> 4141 <td> </td> 4142 </tr> 4143 <tr> 4144 <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); 4145 </td> 4146 <td> </td> 4147 </tr> 4148 </tbody></table> 4149 </div> 4150 <div class='jd-tagdata jd-tagdescr'> 4151 <p> Returns the maximum value of two arguments. 4152 </p> 4153 </div> 4154 </div> 4155 4156 <a name='android_rs:min'></a> 4157 <div class='jd-details'> 4158 <h4 class='jd-details-title'> 4159 <span class='sympad'>min</span> 4160 <span class='normal'>: Minimum</span> 4161 </h4> 4162 <div class='jd-details-descr'> 4163 <table class='jd-tagtable'><tbody> 4164 <tr> 4165 <td>char min(char a, char b); 4166 </td> 4167 <td> </td> 4168 </tr> 4169 <tr> 4170 <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); 4171 </td> 4172 <td> </td> 4173 </tr> 4174 <tr> 4175 <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); 4176 </td> 4177 <td> </td> 4178 </tr> 4179 <tr> 4180 <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); 4181 </td> 4182 <td> </td> 4183 </tr> 4184 <tr> 4185 <td>float min(float a, float b); 4186 </td> 4187 <td> </td> 4188 </tr> 4189 <tr> 4190 <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, float b); 4191 </td> 4192 <td> </td> 4193 </tr> 4194 <tr> 4195 <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); 4196 </td> 4197 <td> </td> 4198 </tr> 4199 <tr> 4200 <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, float b); 4201 </td> 4202 <td> </td> 4203 </tr> 4204 <tr> 4205 <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); 4206 </td> 4207 <td> </td> 4208 </tr> 4209 <tr> 4210 <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, float b); 4211 </td> 4212 <td> </td> 4213 </tr> 4214 <tr> 4215 <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); 4216 </td> 4217 <td> </td> 4218 </tr> 4219 <tr> 4220 <td>int min(int a, int b); 4221 </td> 4222 <td> </td> 4223 </tr> 4224 <tr> 4225 <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); 4226 </td> 4227 <td> </td> 4228 </tr> 4229 <tr> 4230 <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); 4231 </td> 4232 <td> </td> 4233 </tr> 4234 <tr> 4235 <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); 4236 </td> 4237 <td> </td> 4238 </tr> 4239 <tr> 4240 <td>long min(long a, long b); 4241 </td> 4242 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4243 </td> 4244 </tr> 4245 <tr> 4246 <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); 4247 </td> 4248 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4249 </td> 4250 </tr> 4251 <tr> 4252 <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); 4253 </td> 4254 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4255 </td> 4256 </tr> 4257 <tr> 4258 <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); 4259 </td> 4260 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4261 </td> 4262 </tr> 4263 <tr> 4264 <td>short min(short a, short b); 4265 </td> 4266 <td> </td> 4267 </tr> 4268 <tr> 4269 <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); 4270 </td> 4271 <td> </td> 4272 </tr> 4273 <tr> 4274 <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); 4275 </td> 4276 <td> </td> 4277 </tr> 4278 <tr> 4279 <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); 4280 </td> 4281 <td> </td> 4282 </tr> 4283 <tr> 4284 <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); 4285 </td> 4286 <td> </td> 4287 </tr> 4288 <tr> 4289 <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); 4290 </td> 4291 <td> </td> 4292 </tr> 4293 <tr> 4294 <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); 4295 </td> 4296 <td> </td> 4297 </tr> 4298 <tr> 4299 <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); 4300 </td> 4301 <td> </td> 4302 </tr> 4303 <tr> 4304 <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); 4305 </td> 4306 <td> </td> 4307 </tr> 4308 <tr> 4309 <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); 4310 </td> 4311 <td> </td> 4312 </tr> 4313 <tr> 4314 <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); 4315 </td> 4316 <td> </td> 4317 </tr> 4318 <tr> 4319 <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); 4320 </td> 4321 <td> </td> 4322 </tr> 4323 <tr> 4324 <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); 4325 </td> 4326 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4327 </td> 4328 </tr> 4329 <tr> 4330 <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); 4331 </td> 4332 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4333 </td> 4334 </tr> 4335 <tr> 4336 <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); 4337 </td> 4338 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4339 </td> 4340 </tr> 4341 <tr> 4342 <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); 4343 </td> 4344 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4345 </td> 4346 </tr> 4347 <tr> 4348 <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); 4349 </td> 4350 <td> </td> 4351 </tr> 4352 <tr> 4353 <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); 4354 </td> 4355 <td> </td> 4356 </tr> 4357 <tr> 4358 <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); 4359 </td> 4360 <td> </td> 4361 </tr> 4362 <tr> 4363 <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); 4364 </td> 4365 <td> </td> 4366 </tr> 4367 </tbody></table> 4368 </div> 4369 <div class='jd-tagdata jd-tagdescr'> 4370 <p> Returns the minimum value of two arguments. 4371 </p> 4372 </div> 4373 </div> 4374 4375 <a name='android_rs:mix'></a> 4376 <div class='jd-details'> 4377 <h4 class='jd-details-title'> 4378 <span class='sympad'>mix</span> 4379 <span class='normal'>: Mixes two values</span> 4380 </h4> 4381 <div class='jd-details-descr'> 4382 <table class='jd-tagtable'><tbody> 4383 <tr> 4384 <td>float mix(float start, float stop, float fraction); 4385 </td> 4386 <td> </td> 4387 </tr> 4388 <tr> 4389 <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); 4390 </td> 4391 <td> </td> 4392 </tr> 4393 <tr> 4394 <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); 4395 </td> 4396 <td> </td> 4397 </tr> 4398 <tr> 4399 <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); 4400 </td> 4401 <td> </td> 4402 </tr> 4403 <tr> 4404 <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); 4405 </td> 4406 <td> </td> 4407 </tr> 4408 <tr> 4409 <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); 4410 </td> 4411 <td> </td> 4412 </tr> 4413 <tr> 4414 <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); 4415 </td> 4416 <td> </td> 4417 </tr> 4418 </tbody></table> 4419 </div> 4420 <div class='jd-tagdata jd-tagdescr'> 4421 <p> Returns start + ((stop - start) * fraction). 4422 </p> 4423 4424 <p> This can be useful for mixing two values. For example, to create a new color that is 4425 40% color1 and 60% color2, use <code>mix(color1, color2, 0.6f)</code>. 4426 </p> 4427 </div> 4428 </div> 4429 4430 <a name='android_rs:modf'></a> 4431 <div class='jd-details'> 4432 <h4 class='jd-details-title'> 4433 <span class='sympad'>modf</span> 4434 <span class='normal'>: Integral and fractional components</span> 4435 </h4> 4436 <div class='jd-details-descr'> 4437 <table class='jd-tagtable'><tbody> 4438 <tr> 4439 <td>float modf(float v, float* integral_part); 4440 </td> 4441 <td> </td> 4442 </tr> 4443 <tr> 4444 <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); 4445 </td> 4446 <td> </td> 4447 </tr> 4448 <tr> 4449 <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); 4450 </td> 4451 <td> </td> 4452 </tr> 4453 <tr> 4454 <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); 4455 </td> 4456 <td> </td> 4457 </tr> 4458 </tbody></table> 4459 </div> 4460 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 4461 <table class='jd-tagtable'><tbody> 4462 <tr><th>v</th><td>Source value.</td></tr> 4463 <tr><th>integral_part</th><td>*integral_part will be set to the integral portion of the number.</td></tr> 4464 </tbody></table> 4465 </div> 4466 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5> 4467 <table class='jd-tagtable'><tbody> 4468 <tr><td>Floating point portion of the value.</td></tr> 4469 </tbody></table> 4470 </div> 4471 <div class='jd-tagdata jd-tagdescr'> 4472 <p> Returns the integral and fractional components of a number. 4473 </p> 4474 4475 <p> Both components will have the same sign as x. For example, for an input of -3.72f, 4476 iret will be set to -3.f and .72f will be returned. 4477 </p> 4478 </div> 4479 </div> 4480 4481 <a name='android_rs:nan'></a> 4482 <div class='jd-details'> 4483 <h4 class='jd-details-title'> 4484 <span class='sympad'>nan</span> 4485 <span class='normal'>: Not a Number</span> 4486 </h4> 4487 <div class='jd-details-descr'> 4488 <table class='jd-tagtable'><tbody> 4489 <tr> 4490 <td>float nan(<a href='rs_value_types.html#android_rs:uint'>uint</a> v); 4491 </td> 4492 <td> </td> 4493 </tr> 4494 </tbody></table> 4495 </div> 4496 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 4497 <table class='jd-tagtable'><tbody> 4498 <tr><th>v</th><td>Not used.</td></tr> 4499 </tbody></table> 4500 </div> 4501 <div class='jd-tagdata jd-tagdescr'> 4502 <p> Returns a NaN value (Not a Number). 4503 </p> 4504 </div> 4505 </div> 4506 4507 <a name='android_rs:native_acos'></a> 4508 <div class='jd-details'> 4509 <h4 class='jd-details-title'> 4510 <span class='sympad'>native_acos</span> 4511 <span class='normal'>: Approximate inverse cosine</span> 4512 </h4> 4513 <div class='jd-details-descr'> 4514 <table class='jd-tagtable'><tbody> 4515 <tr> 4516 <td>float native_acos(float v); 4517 </td> 4518 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4519 </td> 4520 </tr> 4521 <tr> 4522 <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); 4523 </td> 4524 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4525 </td> 4526 </tr> 4527 <tr> 4528 <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); 4529 </td> 4530 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4531 </td> 4532 </tr> 4533 <tr> 4534 <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); 4535 </td> 4536 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4537 </td> 4538 </tr> 4539 </tbody></table> 4540 </div> 4541 <div class='jd-tagdata jd-tagdescr'> 4542 <p> Returns the approximate inverse cosine, in radians. 4543 </p> 4544 4545 <p> This function yields undefined results from input values less than -1 or greater than 1. 4546 </p> 4547 4548 <p> See also <a href='rs_math.html#android_rs:acos'>acos</a>(). 4549 </p> 4550 </div> 4551 </div> 4552 4553 <a name='android_rs:native_acosh'></a> 4554 <div class='jd-details'> 4555 <h4 class='jd-details-title'> 4556 <span class='sympad'>native_acosh</span> 4557 <span class='normal'>: Approximate inverse hyperbolic cosine</span> 4558 </h4> 4559 <div class='jd-details-descr'> 4560 <table class='jd-tagtable'><tbody> 4561 <tr> 4562 <td>float native_acosh(float v); 4563 </td> 4564 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4565 </td> 4566 </tr> 4567 <tr> 4568 <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); 4569 </td> 4570 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4571 </td> 4572 </tr> 4573 <tr> 4574 <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); 4575 </td> 4576 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4577 </td> 4578 </tr> 4579 <tr> 4580 <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); 4581 </td> 4582 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4583 </td> 4584 </tr> 4585 </tbody></table> 4586 </div> 4587 <div class='jd-tagdata jd-tagdescr'> 4588 <p> Returns the approximate inverse hyperbolic cosine, in radians. 4589 </p> 4590 4591 <p> See also <a href='rs_math.html#android_rs:acosh'>acosh</a>(). 4592 </p> 4593 </div> 4594 </div> 4595 4596 <a name='android_rs:native_acospi'></a> 4597 <div class='jd-details'> 4598 <h4 class='jd-details-title'> 4599 <span class='sympad'>native_acospi</span> 4600 <span class='normal'>: Approximate inverse cosine divided by pi</span> 4601 </h4> 4602 <div class='jd-details-descr'> 4603 <table class='jd-tagtable'><tbody> 4604 <tr> 4605 <td>float native_acospi(float v); 4606 </td> 4607 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4608 </td> 4609 </tr> 4610 <tr> 4611 <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); 4612 </td> 4613 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4614 </td> 4615 </tr> 4616 <tr> 4617 <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); 4618 </td> 4619 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4620 </td> 4621 </tr> 4622 <tr> 4623 <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); 4624 </td> 4625 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4626 </td> 4627 </tr> 4628 </tbody></table> 4629 </div> 4630 <div class='jd-tagdata jd-tagdescr'> 4631 <p> Returns the approximate inverse cosine in radians, divided by pi. 4632 </p> 4633 4634 <p> To get an inverse cosine measured in degrees, use <code>acospi(a) * 180.f</code>. 4635 </p> 4636 4637 <p> This function yields undefined results from input values less than -1 or greater than 1. 4638 </p> 4639 4640 <p> See also <a href='rs_math.html#android_rs:acospi'>acospi</a>(). 4641 </p> 4642 </div> 4643 </div> 4644 4645 <a name='android_rs:native_asin'></a> 4646 <div class='jd-details'> 4647 <h4 class='jd-details-title'> 4648 <span class='sympad'>native_asin</span> 4649 <span class='normal'>: Approximate inverse sine</span> 4650 </h4> 4651 <div class='jd-details-descr'> 4652 <table class='jd-tagtable'><tbody> 4653 <tr> 4654 <td>float native_asin(float v); 4655 </td> 4656 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4657 </td> 4658 </tr> 4659 <tr> 4660 <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); 4661 </td> 4662 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4663 </td> 4664 </tr> 4665 <tr> 4666 <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); 4667 </td> 4668 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4669 </td> 4670 </tr> 4671 <tr> 4672 <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); 4673 </td> 4674 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4675 </td> 4676 </tr> 4677 </tbody></table> 4678 </div> 4679 <div class='jd-tagdata jd-tagdescr'> 4680 <p> Returns the approximate inverse sine, in radians. 4681 </p> 4682 4683 <p> This function yields undefined results from input values less than -1 or greater than 1. 4684 </p> 4685 4686 <p> See also <a href='rs_math.html#android_rs:asin'>asin</a>(). 4687 </p> 4688 </div> 4689 </div> 4690 4691 <a name='android_rs:native_asinh'></a> 4692 <div class='jd-details'> 4693 <h4 class='jd-details-title'> 4694 <span class='sympad'>native_asinh</span> 4695 <span class='normal'>: Approximate inverse hyperbolic sine</span> 4696 </h4> 4697 <div class='jd-details-descr'> 4698 <table class='jd-tagtable'><tbody> 4699 <tr> 4700 <td>float native_asinh(float v); 4701 </td> 4702 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4703 </td> 4704 </tr> 4705 <tr> 4706 <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); 4707 </td> 4708 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4709 </td> 4710 </tr> 4711 <tr> 4712 <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); 4713 </td> 4714 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4715 </td> 4716 </tr> 4717 <tr> 4718 <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); 4719 </td> 4720 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4721 </td> 4722 </tr> 4723 </tbody></table> 4724 </div> 4725 <div class='jd-tagdata jd-tagdescr'> 4726 <p> Returns the approximate inverse hyperbolic sine, in radians. 4727 </p> 4728 4729 <p> See also <a href='rs_math.html#android_rs:asinh'>asinh</a>(). 4730 </p> 4731 </div> 4732 </div> 4733 4734 <a name='android_rs:native_asinpi'></a> 4735 <div class='jd-details'> 4736 <h4 class='jd-details-title'> 4737 <span class='sympad'>native_asinpi</span> 4738 <span class='normal'>: Approximate inverse sine divided by pi</span> 4739 </h4> 4740 <div class='jd-details-descr'> 4741 <table class='jd-tagtable'><tbody> 4742 <tr> 4743 <td>float native_asinpi(float v); 4744 </td> 4745 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4746 </td> 4747 </tr> 4748 <tr> 4749 <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); 4750 </td> 4751 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4752 </td> 4753 </tr> 4754 <tr> 4755 <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); 4756 </td> 4757 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4758 </td> 4759 </tr> 4760 <tr> 4761 <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); 4762 </td> 4763 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4764 </td> 4765 </tr> 4766 </tbody></table> 4767 </div> 4768 <div class='jd-tagdata jd-tagdescr'> 4769 <p> Returns the approximate inverse sine in radians, divided by pi. 4770 </p> 4771 4772 <p> To get an inverse sine measured in degrees, use <code>asinpi(a) * 180.f</code>. 4773 </p> 4774 4775 <p> This function yields undefined results from input values less than -1 or greater than 1. 4776 </p> 4777 4778 <p> See also <a href='rs_math.html#android_rs:asinpi'>asinpi</a>(). 4779 </p> 4780 </div> 4781 </div> 4782 4783 <a name='android_rs:native_atan'></a> 4784 <div class='jd-details'> 4785 <h4 class='jd-details-title'> 4786 <span class='sympad'>native_atan</span> 4787 <span class='normal'>: Approximate inverse tangent</span> 4788 </h4> 4789 <div class='jd-details-descr'> 4790 <table class='jd-tagtable'><tbody> 4791 <tr> 4792 <td>float native_atan(float v); 4793 </td> 4794 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4795 </td> 4796 </tr> 4797 <tr> 4798 <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); 4799 </td> 4800 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4801 </td> 4802 </tr> 4803 <tr> 4804 <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); 4805 </td> 4806 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4807 </td> 4808 </tr> 4809 <tr> 4810 <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); 4811 </td> 4812 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4813 </td> 4814 </tr> 4815 </tbody></table> 4816 </div> 4817 <div class='jd-tagdata jd-tagdescr'> 4818 <p> Returns the approximate inverse tangent, in radians. 4819 </p> 4820 4821 <p> See also <a href='rs_math.html#android_rs:atan'>atan</a>(). 4822 </p> 4823 </div> 4824 </div> 4825 4826 <a name='android_rs:native_atan2'></a> 4827 <div class='jd-details'> 4828 <h4 class='jd-details-title'> 4829 <span class='sympad'>native_atan2</span> 4830 <span class='normal'>: Approximate inverse tangent of a ratio</span> 4831 </h4> 4832 <div class='jd-details-descr'> 4833 <table class='jd-tagtable'><tbody> 4834 <tr> 4835 <td>float native_atan2(float numerator, float denominator); 4836 </td> 4837 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4838 </td> 4839 </tr> 4840 <tr> 4841 <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); 4842 </td> 4843 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4844 </td> 4845 </tr> 4846 <tr> 4847 <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); 4848 </td> 4849 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4850 </td> 4851 </tr> 4852 <tr> 4853 <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); 4854 </td> 4855 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4856 </td> 4857 </tr> 4858 </tbody></table> 4859 </div> 4860 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 4861 <table class='jd-tagtable'><tbody> 4862 <tr><th>numerator</th><td>Numerator.</td></tr> 4863 <tr><th>denominator</th><td>Denominator. Can be 0.</td></tr> 4864 </tbody></table> 4865 </div> 4866 <div class='jd-tagdata jd-tagdescr'> 4867 <p> Returns the approximate inverse tangent of <code>(numerator / denominator)</code>, in radians. 4868 </p> 4869 4870 <p> See also <a href='rs_math.html#android_rs:atan2'>atan2</a>(). 4871 </p> 4872 </div> 4873 </div> 4874 4875 <a name='android_rs:native_atan2pi'></a> 4876 <div class='jd-details'> 4877 <h4 class='jd-details-title'> 4878 <span class='sympad'>native_atan2pi</span> 4879 <span class='normal'>: Approximate inverse tangent of a ratio, divided by pi</span> 4880 </h4> 4881 <div class='jd-details-descr'> 4882 <table class='jd-tagtable'><tbody> 4883 <tr> 4884 <td>float native_atan2pi(float numerator, float denominator); 4885 </td> 4886 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4887 </td> 4888 </tr> 4889 <tr> 4890 <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); 4891 </td> 4892 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4893 </td> 4894 </tr> 4895 <tr> 4896 <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); 4897 </td> 4898 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4899 </td> 4900 </tr> 4901 <tr> 4902 <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); 4903 </td> 4904 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4905 </td> 4906 </tr> 4907 </tbody></table> 4908 </div> 4909 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 4910 <table class='jd-tagtable'><tbody> 4911 <tr><th>numerator</th><td>Numerator.</td></tr> 4912 <tr><th>denominator</th><td>Denominator. Can be 0.</td></tr> 4913 </tbody></table> 4914 </div> 4915 <div class='jd-tagdata jd-tagdescr'> 4916 <p> Returns the approximate inverse tangent of <code>(numerator / denominator)</code>, 4917 in radians, divided by pi. 4918 </p> 4919 4920 <p> To get an inverse tangent measured in degrees, use <code>atan2pi(n, d) * 180.f</code>. 4921 </p> 4922 4923 <p> See also <a href='rs_math.html#android_rs:atan2pi'>atan2pi</a>(). 4924 </p> 4925 </div> 4926 </div> 4927 4928 <a name='android_rs:native_atanh'></a> 4929 <div class='jd-details'> 4930 <h4 class='jd-details-title'> 4931 <span class='sympad'>native_atanh</span> 4932 <span class='normal'>: Approximate inverse hyperbolic tangent</span> 4933 </h4> 4934 <div class='jd-details-descr'> 4935 <table class='jd-tagtable'><tbody> 4936 <tr> 4937 <td>float native_atanh(float v); 4938 </td> 4939 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4940 </td> 4941 </tr> 4942 <tr> 4943 <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); 4944 </td> 4945 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4946 </td> 4947 </tr> 4948 <tr> 4949 <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); 4950 </td> 4951 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4952 </td> 4953 </tr> 4954 <tr> 4955 <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); 4956 </td> 4957 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4958 </td> 4959 </tr> 4960 </tbody></table> 4961 </div> 4962 <div class='jd-tagdata jd-tagdescr'> 4963 <p> Returns the approximate inverse hyperbolic tangent, in radians. 4964 </p> 4965 4966 <p> See also <a href='rs_math.html#android_rs:atanh'>atanh</a>(). 4967 </p> 4968 </div> 4969 </div> 4970 4971 <a name='android_rs:native_atanpi'></a> 4972 <div class='jd-details'> 4973 <h4 class='jd-details-title'> 4974 <span class='sympad'>native_atanpi</span> 4975 <span class='normal'>: Approximate inverse tangent divided by pi</span> 4976 </h4> 4977 <div class='jd-details-descr'> 4978 <table class='jd-tagtable'><tbody> 4979 <tr> 4980 <td>float native_atanpi(float v); 4981 </td> 4982 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4983 </td> 4984 </tr> 4985 <tr> 4986 <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); 4987 </td> 4988 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4989 </td> 4990 </tr> 4991 <tr> 4992 <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); 4993 </td> 4994 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 4995 </td> 4996 </tr> 4997 <tr> 4998 <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); 4999 </td> 5000 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5001 </td> 5002 </tr> 5003 </tbody></table> 5004 </div> 5005 <div class='jd-tagdata jd-tagdescr'> 5006 <p> Returns the approximate inverse tangent in radians, divided by pi. 5007 </p> 5008 5009 <p> To get an inverse tangent measured in degrees, use <code>atanpi(a) * 180.f</code>. 5010 </p> 5011 5012 <p> See also <a href='rs_math.html#android_rs:atanpi'>atanpi</a>(). 5013 </p> 5014 </div> 5015 </div> 5016 5017 <a name='android_rs:native_cbrt'></a> 5018 <div class='jd-details'> 5019 <h4 class='jd-details-title'> 5020 <span class='sympad'>native_cbrt</span> 5021 <span class='normal'>: Approximate cube root</span> 5022 </h4> 5023 <div class='jd-details-descr'> 5024 <table class='jd-tagtable'><tbody> 5025 <tr> 5026 <td>float native_cbrt(float v); 5027 </td> 5028 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5029 </td> 5030 </tr> 5031 <tr> 5032 <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); 5033 </td> 5034 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5035 </td> 5036 </tr> 5037 <tr> 5038 <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); 5039 </td> 5040 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5041 </td> 5042 </tr> 5043 <tr> 5044 <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); 5045 </td> 5046 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5047 </td> 5048 </tr> 5049 </tbody></table> 5050 </div> 5051 <div class='jd-tagdata jd-tagdescr'> 5052 <p> Returns the approximate cubic root. 5053 </p> 5054 5055 <p> See also <a href='rs_math.html#android_rs:cbrt'>cbrt</a>(). 5056 </p> 5057 </div> 5058 </div> 5059 5060 <a name='android_rs:native_cos'></a> 5061 <div class='jd-details'> 5062 <h4 class='jd-details-title'> 5063 <span class='sympad'>native_cos</span> 5064 <span class='normal'>: Approximate cosine</span> 5065 </h4> 5066 <div class='jd-details-descr'> 5067 <table class='jd-tagtable'><tbody> 5068 <tr> 5069 <td>float native_cos(float v); 5070 </td> 5071 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5072 </td> 5073 </tr> 5074 <tr> 5075 <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); 5076 </td> 5077 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5078 </td> 5079 </tr> 5080 <tr> 5081 <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); 5082 </td> 5083 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5084 </td> 5085 </tr> 5086 <tr> 5087 <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); 5088 </td> 5089 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5090 </td> 5091 </tr> 5092 </tbody></table> 5093 </div> 5094 <div class='jd-tagdata jd-tagdescr'> 5095 <p> Returns the approximate cosine of an angle measured in radians. 5096 </p> 5097 5098 <p> See also <a href='rs_math.html#android_rs:cos'>cos</a>(). 5099 </p> 5100 </div> 5101 </div> 5102 5103 <a name='android_rs:native_cosh'></a> 5104 <div class='jd-details'> 5105 <h4 class='jd-details-title'> 5106 <span class='sympad'>native_cosh</span> 5107 <span class='normal'>: Approximate hypebolic cosine</span> 5108 </h4> 5109 <div class='jd-details-descr'> 5110 <table class='jd-tagtable'><tbody> 5111 <tr> 5112 <td>float native_cosh(float v); 5113 </td> 5114 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5115 </td> 5116 </tr> 5117 <tr> 5118 <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); 5119 </td> 5120 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5121 </td> 5122 </tr> 5123 <tr> 5124 <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); 5125 </td> 5126 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5127 </td> 5128 </tr> 5129 <tr> 5130 <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); 5131 </td> 5132 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5133 </td> 5134 </tr> 5135 </tbody></table> 5136 </div> 5137 <div class='jd-tagdata jd-tagdescr'> 5138 <p> Returns the approximate hypebolic cosine. 5139 </p> 5140 5141 <p> See also <a href='rs_math.html#android_rs:cosh'>cosh</a>(). 5142 </p> 5143 </div> 5144 </div> 5145 5146 <a name='android_rs:native_cospi'></a> 5147 <div class='jd-details'> 5148 <h4 class='jd-details-title'> 5149 <span class='sympad'>native_cospi</span> 5150 <span class='normal'>: Approximate cosine of a number multiplied by pi</span> 5151 </h4> 5152 <div class='jd-details-descr'> 5153 <table class='jd-tagtable'><tbody> 5154 <tr> 5155 <td>float native_cospi(float v); 5156 </td> 5157 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5158 </td> 5159 </tr> 5160 <tr> 5161 <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); 5162 </td> 5163 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5164 </td> 5165 </tr> 5166 <tr> 5167 <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); 5168 </td> 5169 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5170 </td> 5171 </tr> 5172 <tr> 5173 <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); 5174 </td> 5175 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5176 </td> 5177 </tr> 5178 </tbody></table> 5179 </div> 5180 <div class='jd-tagdata jd-tagdescr'> 5181 <p> Returns the approximate cosine of (v * pi), where (v * pi) is measured in radians. 5182 </p> 5183 5184 <p> To get the cosine of a value measured in degrees, call <code>cospi(v / 180.f)</code>. 5185 </p> 5186 5187 <p> See also <a href='rs_math.html#android_rs:cospi'>cospi</a>(). 5188 </p> 5189 </div> 5190 </div> 5191 5192 <a name='android_rs:native_divide'></a> 5193 <div class='jd-details'> 5194 <h4 class='jd-details-title'> 5195 <span class='sympad'>native_divide</span> 5196 <span class='normal'>: Approximate division</span> 5197 </h4> 5198 <div class='jd-details-descr'> 5199 <table class='jd-tagtable'><tbody> 5200 <tr> 5201 <td>float native_divide(float left_vector, float right_vector); 5202 </td> 5203 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5204 </td> 5205 </tr> 5206 <tr> 5207 <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); 5208 </td> 5209 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5210 </td> 5211 </tr> 5212 <tr> 5213 <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); 5214 </td> 5215 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5216 </td> 5217 </tr> 5218 <tr> 5219 <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); 5220 </td> 5221 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5222 </td> 5223 </tr> 5224 </tbody></table> 5225 </div> 5226 <div class='jd-tagdata jd-tagdescr'> 5227 <p> Computes the approximate division of two values. 5228 </p> 5229 </div> 5230 </div> 5231 5232 <a name='android_rs:native_exp'></a> 5233 <div class='jd-details'> 5234 <h4 class='jd-details-title'> 5235 <span class='sympad'>native_exp</span> 5236 <span class='normal'>: Approximate e raised to a number</span> 5237 </h4> 5238 <div class='jd-details-descr'> 5239 <table class='jd-tagtable'><tbody> 5240 <tr> 5241 <td>float native_exp(float v); 5242 </td> 5243 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5244 </td> 5245 </tr> 5246 <tr> 5247 <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); 5248 </td> 5249 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5250 </td> 5251 </tr> 5252 <tr> 5253 <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); 5254 </td> 5255 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5256 </td> 5257 </tr> 5258 <tr> 5259 <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); 5260 </td> 5261 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5262 </td> 5263 </tr> 5264 </tbody></table> 5265 </div> 5266 <div class='jd-tagdata jd-tagdescr'> 5267 <p> Fast approximate exp. 5268 </p> 5269 5270 <p> It is valid for inputs from -86.f to 86.f. The precision is no worse than what would be 5271 expected from using 16 bit floating point values. 5272 </p> 5273 5274 <p> See also <a href='rs_math.html#android_rs:exp'>exp</a>(). 5275 </p> 5276 </div> 5277 </div> 5278 5279 <a name='android_rs:native_exp10'></a> 5280 <div class='jd-details'> 5281 <h4 class='jd-details-title'> 5282 <span class='sympad'>native_exp10</span> 5283 <span class='normal'>: Approximate 10 raised to a number</span> 5284 </h4> 5285 <div class='jd-details-descr'> 5286 <table class='jd-tagtable'><tbody> 5287 <tr> 5288 <td>float native_exp10(float v); 5289 </td> 5290 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5291 </td> 5292 </tr> 5293 <tr> 5294 <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); 5295 </td> 5296 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5297 </td> 5298 </tr> 5299 <tr> 5300 <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); 5301 </td> 5302 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5303 </td> 5304 </tr> 5305 <tr> 5306 <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); 5307 </td> 5308 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5309 </td> 5310 </tr> 5311 </tbody></table> 5312 </div> 5313 <div class='jd-tagdata jd-tagdescr'> 5314 <p> Fast approximate exp10. 5315 </p> 5316 5317 <p> It is valid for inputs from -37.f to 37.f. The precision is no worse than what would be 5318 expected from using 16 bit floating point values. 5319 </p> 5320 5321 <p> See also <a href='rs_math.html#android_rs:exp10'>exp10</a>(). 5322 </p> 5323 </div> 5324 </div> 5325 5326 <a name='android_rs:native_exp2'></a> 5327 <div class='jd-details'> 5328 <h4 class='jd-details-title'> 5329 <span class='sympad'>native_exp2</span> 5330 <span class='normal'>: Approximate 2 raised to a number</span> 5331 </h4> 5332 <div class='jd-details-descr'> 5333 <table class='jd-tagtable'><tbody> 5334 <tr> 5335 <td>float native_exp2(float v); 5336 </td> 5337 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5338 </td> 5339 </tr> 5340 <tr> 5341 <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); 5342 </td> 5343 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5344 </td> 5345 </tr> 5346 <tr> 5347 <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); 5348 </td> 5349 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5350 </td> 5351 </tr> 5352 <tr> 5353 <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); 5354 </td> 5355 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5356 </td> 5357 </tr> 5358 </tbody></table> 5359 </div> 5360 <div class='jd-tagdata jd-tagdescr'> 5361 <p> Fast approximate exp2. 5362 </p> 5363 5364 <p> It is valid for inputs from -125.f to 125.f. The precision is no worse than what would be 5365 expected from using 16 bit floating point values. 5366 </p> 5367 5368 <p> See also <a href='rs_math.html#android_rs:exp2'>exp2</a>(). 5369 </p> 5370 </div> 5371 </div> 5372 5373 <a name='android_rs:native_expm1'></a> 5374 <div class='jd-details'> 5375 <h4 class='jd-details-title'> 5376 <span class='sympad'>native_expm1</span> 5377 <span class='normal'>: Approximate e raised to a number minus one</span> 5378 </h4> 5379 <div class='jd-details-descr'> 5380 <table class='jd-tagtable'><tbody> 5381 <tr> 5382 <td>float native_expm1(float v); 5383 </td> 5384 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5385 </td> 5386 </tr> 5387 <tr> 5388 <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); 5389 </td> 5390 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5391 </td> 5392 </tr> 5393 <tr> 5394 <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); 5395 </td> 5396 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5397 </td> 5398 </tr> 5399 <tr> 5400 <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); 5401 </td> 5402 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5403 </td> 5404 </tr> 5405 </tbody></table> 5406 </div> 5407 <div class='jd-tagdata jd-tagdescr'> 5408 <p> Returns the approximate (e ^ v) - 1. 5409 </p> 5410 5411 <p> See also <a href='rs_math.html#android_rs:expm1'>expm1</a>(). 5412 </p> 5413 </div> 5414 </div> 5415 5416 <a name='android_rs:native_hypot'></a> 5417 <div class='jd-details'> 5418 <h4 class='jd-details-title'> 5419 <span class='sympad'>native_hypot</span> 5420 <span class='normal'>: Approximate hypotenuse</span> 5421 </h4> 5422 <div class='jd-details-descr'> 5423 <table class='jd-tagtable'><tbody> 5424 <tr> 5425 <td>float native_hypot(float a, float b); 5426 </td> 5427 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5428 </td> 5429 </tr> 5430 <tr> 5431 <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); 5432 </td> 5433 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5434 </td> 5435 </tr> 5436 <tr> 5437 <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); 5438 </td> 5439 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5440 </td> 5441 </tr> 5442 <tr> 5443 <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); 5444 </td> 5445 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5446 </td> 5447 </tr> 5448 </tbody></table> 5449 </div> 5450 <div class='jd-tagdata jd-tagdescr'> 5451 <p> Returns the approximate native_sqrt(a * a + b * b) 5452 </p> 5453 5454 <p> See also <a href='rs_math.html#android_rs:hypot'>hypot</a>(). 5455 </p> 5456 </div> 5457 </div> 5458 5459 <a name='android_rs:native_log'></a> 5460 <div class='jd-details'> 5461 <h4 class='jd-details-title'> 5462 <span class='sympad'>native_log</span> 5463 <span class='normal'>: Approximate natural logarithm</span> 5464 </h4> 5465 <div class='jd-details-descr'> 5466 <table class='jd-tagtable'><tbody> 5467 <tr> 5468 <td>float native_log(float v); 5469 </td> 5470 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5471 </td> 5472 </tr> 5473 <tr> 5474 <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); 5475 </td> 5476 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5477 </td> 5478 </tr> 5479 <tr> 5480 <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); 5481 </td> 5482 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5483 </td> 5484 </tr> 5485 <tr> 5486 <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); 5487 </td> 5488 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5489 </td> 5490 </tr> 5491 </tbody></table> 5492 </div> 5493 <div class='jd-tagdata jd-tagdescr'> 5494 <p> Fast approximate log. 5495 </p> 5496 5497 <p> It is not accurate for values very close to zero. 5498 </p> 5499 5500 <p> See also <a href='rs_math.html#android_rs:log'>log</a>(). 5501 </p> 5502 </div> 5503 </div> 5504 5505 <a name='android_rs:native_log10'></a> 5506 <div class='jd-details'> 5507 <h4 class='jd-details-title'> 5508 <span class='sympad'>native_log10</span> 5509 <span class='normal'>: Approximate base 10 logarithm</span> 5510 </h4> 5511 <div class='jd-details-descr'> 5512 <table class='jd-tagtable'><tbody> 5513 <tr> 5514 <td>float native_log10(float v); 5515 </td> 5516 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5517 </td> 5518 </tr> 5519 <tr> 5520 <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); 5521 </td> 5522 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5523 </td> 5524 </tr> 5525 <tr> 5526 <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); 5527 </td> 5528 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5529 </td> 5530 </tr> 5531 <tr> 5532 <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); 5533 </td> 5534 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5535 </td> 5536 </tr> 5537 </tbody></table> 5538 </div> 5539 <div class='jd-tagdata jd-tagdescr'> 5540 <p> Fast approximate log10. 5541 </p> 5542 5543 <p> It is not accurate for values very close to zero. 5544 </p> 5545 5546 <p> See also <a href='rs_math.html#android_rs:log10'>log10</a>(). 5547 </p> 5548 </div> 5549 </div> 5550 5551 <a name='android_rs:native_log1p'></a> 5552 <div class='jd-details'> 5553 <h4 class='jd-details-title'> 5554 <span class='sympad'>native_log1p</span> 5555 <span class='normal'>: Approximate natural logarithm of a value plus 1</span> 5556 </h4> 5557 <div class='jd-details-descr'> 5558 <table class='jd-tagtable'><tbody> 5559 <tr> 5560 <td>float native_log1p(float v); 5561 </td> 5562 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5563 </td> 5564 </tr> 5565 <tr> 5566 <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); 5567 </td> 5568 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5569 </td> 5570 </tr> 5571 <tr> 5572 <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); 5573 </td> 5574 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5575 </td> 5576 </tr> 5577 <tr> 5578 <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); 5579 </td> 5580 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5581 </td> 5582 </tr> 5583 </tbody></table> 5584 </div> 5585 <div class='jd-tagdata jd-tagdescr'> 5586 <p> Returns the approximate natural logarithm of (v + 1.0f) 5587 </p> 5588 5589 <p> See also <a href='rs_math.html#android_rs:log1p'>log1p</a>(). 5590 </p> 5591 </div> 5592 </div> 5593 5594 <a name='android_rs:native_log2'></a> 5595 <div class='jd-details'> 5596 <h4 class='jd-details-title'> 5597 <span class='sympad'>native_log2</span> 5598 <span class='normal'>: Approximate base 2 logarithm</span> 5599 </h4> 5600 <div class='jd-details-descr'> 5601 <table class='jd-tagtable'><tbody> 5602 <tr> 5603 <td>float native_log2(float v); 5604 </td> 5605 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5606 </td> 5607 </tr> 5608 <tr> 5609 <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); 5610 </td> 5611 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5612 </td> 5613 </tr> 5614 <tr> 5615 <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); 5616 </td> 5617 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5618 </td> 5619 </tr> 5620 <tr> 5621 <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); 5622 </td> 5623 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5624 </td> 5625 </tr> 5626 </tbody></table> 5627 </div> 5628 <div class='jd-tagdata jd-tagdescr'> 5629 <p> Fast approximate log2. 5630 </p> 5631 5632 <p> It is not accurate for values very close to zero. 5633 </p> 5634 5635 <p> See also <a href='rs_math.html#android_rs:log2'>log2</a>(). 5636 </p> 5637 </div> 5638 </div> 5639 5640 <a name='android_rs:native_powr'></a> 5641 <div class='jd-details'> 5642 <h4 class='jd-details-title'> 5643 <span class='sympad'>native_powr</span> 5644 <span class='normal'>: Approximate positive base raised to an exponent</span> 5645 </h4> 5646 <div class='jd-details-descr'> 5647 <table class='jd-tagtable'><tbody> 5648 <tr> 5649 <td>float native_powr(float base, float exponent); 5650 </td> 5651 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5652 </td> 5653 </tr> 5654 <tr> 5655 <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); 5656 </td> 5657 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5658 </td> 5659 </tr> 5660 <tr> 5661 <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); 5662 </td> 5663 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5664 </td> 5665 </tr> 5666 <tr> 5667 <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); 5668 </td> 5669 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 18</a> 5670 </td> 5671 </tr> 5672 </tbody></table> 5673 </div> 5674 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 5675 <table class='jd-tagtable'><tbody> 5676 <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> 5677 <tr><th>exponent</th><td>Must be between -15.f and 15.f.</td></tr> 5678 </tbody></table> 5679 </div> 5680 <div class='jd-tagdata jd-tagdescr'> 5681 <p> Fast approximate (base ^ exponent). 5682 </p> 5683 5684 <p> See also <a href='rs_math.html#android_rs:powr'>powr</a>(). 5685 </p> 5686 </div> 5687 </div> 5688 5689 <a name='android_rs:native_recip'></a> 5690 <div class='jd-details'> 5691 <h4 class='jd-details-title'> 5692 <span class='sympad'>native_recip</span> 5693 <span class='normal'>: Approximate reciprocal</span> 5694 </h4> 5695 <div class='jd-details-descr'> 5696 <table class='jd-tagtable'><tbody> 5697 <tr> 5698 <td>float native_recip(float v); 5699 </td> 5700 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5701 </td> 5702 </tr> 5703 <tr> 5704 <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); 5705 </td> 5706 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5707 </td> 5708 </tr> 5709 <tr> 5710 <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); 5711 </td> 5712 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5713 </td> 5714 </tr> 5715 <tr> 5716 <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); 5717 </td> 5718 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5719 </td> 5720 </tr> 5721 </tbody></table> 5722 </div> 5723 <div class='jd-tagdata jd-tagdescr'> 5724 <p> Returns the approximate approximate reciprocal of a value. 5725 </p> 5726 5727 <p> See also <a href='rs_math.html#android_rs:half_recip'>half_recip</a>(). 5728 </p> 5729 </div> 5730 </div> 5731 5732 <a name='android_rs:native_rootn'></a> 5733 <div class='jd-details'> 5734 <h4 class='jd-details-title'> 5735 <span class='sympad'>native_rootn</span> 5736 <span class='normal'>: Approximate nth root</span> 5737 </h4> 5738 <div class='jd-details-descr'> 5739 <table class='jd-tagtable'><tbody> 5740 <tr> 5741 <td>float native_rootn(float v, int n); 5742 </td> 5743 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5744 </td> 5745 </tr> 5746 <tr> 5747 <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); 5748 </td> 5749 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5750 </td> 5751 </tr> 5752 <tr> 5753 <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); 5754 </td> 5755 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5756 </td> 5757 </tr> 5758 <tr> 5759 <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); 5760 </td> 5761 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5762 </td> 5763 </tr> 5764 </tbody></table> 5765 </div> 5766 <div class='jd-tagdata jd-tagdescr'> 5767 <p> Compute the approximate Nth root of a value. 5768 </p> 5769 5770 <p> See also <a href='rs_math.html#android_rs:rootn'>rootn</a>(). 5771 </p> 5772 </div> 5773 </div> 5774 5775 <a name='android_rs:native_rsqrt'></a> 5776 <div class='jd-details'> 5777 <h4 class='jd-details-title'> 5778 <span class='sympad'>native_rsqrt</span> 5779 <span class='normal'>: Approximate reciprocal of a square root</span> 5780 </h4> 5781 <div class='jd-details-descr'> 5782 <table class='jd-tagtable'><tbody> 5783 <tr> 5784 <td>float native_rsqrt(float v); 5785 </td> 5786 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5787 </td> 5788 </tr> 5789 <tr> 5790 <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); 5791 </td> 5792 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5793 </td> 5794 </tr> 5795 <tr> 5796 <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); 5797 </td> 5798 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5799 </td> 5800 </tr> 5801 <tr> 5802 <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); 5803 </td> 5804 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5805 </td> 5806 </tr> 5807 </tbody></table> 5808 </div> 5809 <div class='jd-tagdata jd-tagdescr'> 5810 <p> Returns approximate (1 / sqrt(v)). 5811 </p> 5812 5813 <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>(). 5814 </p> 5815 </div> 5816 </div> 5817 5818 <a name='android_rs:native_sin'></a> 5819 <div class='jd-details'> 5820 <h4 class='jd-details-title'> 5821 <span class='sympad'>native_sin</span> 5822 <span class='normal'>: Approximate sine</span> 5823 </h4> 5824 <div class='jd-details-descr'> 5825 <table class='jd-tagtable'><tbody> 5826 <tr> 5827 <td>float native_sin(float v); 5828 </td> 5829 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5830 </td> 5831 </tr> 5832 <tr> 5833 <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); 5834 </td> 5835 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5836 </td> 5837 </tr> 5838 <tr> 5839 <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); 5840 </td> 5841 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5842 </td> 5843 </tr> 5844 <tr> 5845 <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); 5846 </td> 5847 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5848 </td> 5849 </tr> 5850 </tbody></table> 5851 </div> 5852 <div class='jd-tagdata jd-tagdescr'> 5853 <p> Returns the approximate sine of an angle measured in radians. 5854 </p> 5855 5856 <p> See also <a href='rs_math.html#android_rs:sin'>sin</a>(). 5857 </p> 5858 </div> 5859 </div> 5860 5861 <a name='android_rs:native_sincos'></a> 5862 <div class='jd-details'> 5863 <h4 class='jd-details-title'> 5864 <span class='sympad'>native_sincos</span> 5865 <span class='normal'>: Approximate sine and cosine</span> 5866 </h4> 5867 <div class='jd-details-descr'> 5868 <table class='jd-tagtable'><tbody> 5869 <tr> 5870 <td>float native_sincos(float v, float* cos); 5871 </td> 5872 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5873 </td> 5874 </tr> 5875 <tr> 5876 <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); 5877 </td> 5878 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5879 </td> 5880 </tr> 5881 <tr> 5882 <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); 5883 </td> 5884 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5885 </td> 5886 </tr> 5887 <tr> 5888 <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); 5889 </td> 5890 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5891 </td> 5892 </tr> 5893 </tbody></table> 5894 </div> 5895 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 5896 <table class='jd-tagtable'><tbody> 5897 <tr><th>v</th><td>Incoming value in radians.</td></tr> 5898 <tr><th>cos</th><td>*cos will be set to the cosine value.</td></tr> 5899 </tbody></table> 5900 </div> 5901 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5> 5902 <table class='jd-tagtable'><tbody> 5903 <tr><td>Sine.</td></tr> 5904 </tbody></table> 5905 </div> 5906 <div class='jd-tagdata jd-tagdescr'> 5907 <p> Returns the approximate sine and cosine of a value. 5908 </p> 5909 5910 <p> See also <a href='rs_math.html#android_rs:sincos'>sincos</a>(). 5911 </p> 5912 </div> 5913 </div> 5914 5915 <a name='android_rs:native_sinh'></a> 5916 <div class='jd-details'> 5917 <h4 class='jd-details-title'> 5918 <span class='sympad'>native_sinh</span> 5919 <span class='normal'>: Approximate hyperbolic sine</span> 5920 </h4> 5921 <div class='jd-details-descr'> 5922 <table class='jd-tagtable'><tbody> 5923 <tr> 5924 <td>float native_sinh(float v); 5925 </td> 5926 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5927 </td> 5928 </tr> 5929 <tr> 5930 <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); 5931 </td> 5932 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5933 </td> 5934 </tr> 5935 <tr> 5936 <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); 5937 </td> 5938 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5939 </td> 5940 </tr> 5941 <tr> 5942 <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); 5943 </td> 5944 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5945 </td> 5946 </tr> 5947 </tbody></table> 5948 </div> 5949 <div class='jd-tagdata jd-tagdescr'> 5950 <p> Returns the approximate hyperbolic sine of a value specified in radians. 5951 </p> 5952 5953 <p> See also <a href='rs_math.html#android_rs:sinh'>sinh</a>(). 5954 </p> 5955 </div> 5956 </div> 5957 5958 <a name='android_rs:native_sinpi'></a> 5959 <div class='jd-details'> 5960 <h4 class='jd-details-title'> 5961 <span class='sympad'>native_sinpi</span> 5962 <span class='normal'>: Approximate sine of a number multiplied by pi</span> 5963 </h4> 5964 <div class='jd-details-descr'> 5965 <table class='jd-tagtable'><tbody> 5966 <tr> 5967 <td>float native_sinpi(float v); 5968 </td> 5969 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5970 </td> 5971 </tr> 5972 <tr> 5973 <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); 5974 </td> 5975 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5976 </td> 5977 </tr> 5978 <tr> 5979 <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); 5980 </td> 5981 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5982 </td> 5983 </tr> 5984 <tr> 5985 <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); 5986 </td> 5987 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 5988 </td> 5989 </tr> 5990 </tbody></table> 5991 </div> 5992 <div class='jd-tagdata jd-tagdescr'> 5993 <p> Returns the approximate sine of (v * pi), where (v * pi) is measured in radians. 5994 </p> 5995 5996 <p> To get the sine of a value measured in degrees, call <code>sinpi(v / 180.f)</code>. 5997 </p> 5998 5999 <p> See also <a href='rs_math.html#android_rs:sinpi'>sinpi</a>(). 6000 </p> 6001 </div> 6002 </div> 6003 6004 <a name='android_rs:native_sqrt'></a> 6005 <div class='jd-details'> 6006 <h4 class='jd-details-title'> 6007 <span class='sympad'>native_sqrt</span> 6008 <span class='normal'>: Approximate square root</span> 6009 </h4> 6010 <div class='jd-details-descr'> 6011 <table class='jd-tagtable'><tbody> 6012 <tr> 6013 <td>float native_sqrt(float v); 6014 </td> 6015 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6016 </td> 6017 </tr> 6018 <tr> 6019 <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); 6020 </td> 6021 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6022 </td> 6023 </tr> 6024 <tr> 6025 <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); 6026 </td> 6027 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6028 </td> 6029 </tr> 6030 <tr> 6031 <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); 6032 </td> 6033 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6034 </td> 6035 </tr> 6036 </tbody></table> 6037 </div> 6038 <div class='jd-tagdata jd-tagdescr'> 6039 <p> Returns the approximate sqrt(v). 6040 </p> 6041 6042 <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>(). 6043 </p> 6044 </div> 6045 </div> 6046 6047 <a name='android_rs:native_tan'></a> 6048 <div class='jd-details'> 6049 <h4 class='jd-details-title'> 6050 <span class='sympad'>native_tan</span> 6051 <span class='normal'>: Approximate tangent</span> 6052 </h4> 6053 <div class='jd-details-descr'> 6054 <table class='jd-tagtable'><tbody> 6055 <tr> 6056 <td>float native_tan(float v); 6057 </td> 6058 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6059 </td> 6060 </tr> 6061 <tr> 6062 <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); 6063 </td> 6064 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6065 </td> 6066 </tr> 6067 <tr> 6068 <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); 6069 </td> 6070 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6071 </td> 6072 </tr> 6073 <tr> 6074 <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); 6075 </td> 6076 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6077 </td> 6078 </tr> 6079 </tbody></table> 6080 </div> 6081 <div class='jd-tagdata jd-tagdescr'> 6082 <p> Returns the approximate tangent of an angle measured in radians. 6083 </p> 6084 </div> 6085 </div> 6086 6087 <a name='android_rs:native_tanh'></a> 6088 <div class='jd-details'> 6089 <h4 class='jd-details-title'> 6090 <span class='sympad'>native_tanh</span> 6091 <span class='normal'>: Approximate hyperbolic tangent</span> 6092 </h4> 6093 <div class='jd-details-descr'> 6094 <table class='jd-tagtable'><tbody> 6095 <tr> 6096 <td>float native_tanh(float v); 6097 </td> 6098 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6099 </td> 6100 </tr> 6101 <tr> 6102 <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); 6103 </td> 6104 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6105 </td> 6106 </tr> 6107 <tr> 6108 <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); 6109 </td> 6110 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6111 </td> 6112 </tr> 6113 <tr> 6114 <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); 6115 </td> 6116 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6117 </td> 6118 </tr> 6119 </tbody></table> 6120 </div> 6121 <div class='jd-tagdata jd-tagdescr'> 6122 <p> Returns the approximate hyperbolic tangent of a value. 6123 </p> 6124 6125 <p> See also <a href='rs_math.html#android_rs:tanh'>tanh</a>(). 6126 </p> 6127 </div> 6128 </div> 6129 6130 <a name='android_rs:native_tanpi'></a> 6131 <div class='jd-details'> 6132 <h4 class='jd-details-title'> 6133 <span class='sympad'>native_tanpi</span> 6134 <span class='normal'>: Approximate tangent of a number multiplied by pi</span> 6135 </h4> 6136 <div class='jd-details-descr'> 6137 <table class='jd-tagtable'><tbody> 6138 <tr> 6139 <td>float native_tanpi(float v); 6140 </td> 6141 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6142 </td> 6143 </tr> 6144 <tr> 6145 <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); 6146 </td> 6147 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6148 </td> 6149 </tr> 6150 <tr> 6151 <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); 6152 </td> 6153 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6154 </td> 6155 </tr> 6156 <tr> 6157 <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); 6158 </td> 6159 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 6160 </td> 6161 </tr> 6162 </tbody></table> 6163 </div> 6164 <div class='jd-tagdata jd-tagdescr'> 6165 <p> Returns the approximate tangent of (v * pi), where (v * pi) is measured in radians. 6166 </p> 6167 6168 <p> To get the tangent of a value measured in degrees, call <code>tanpi(v / 180.f)</code>. 6169 </p> 6170 6171 <p> See also <a href='rs_math.html#android_rs:tanpi'>tanpi</a>(). 6172 </p> 6173 </div> 6174 </div> 6175 6176 <a name='android_rs:nextafter'></a> 6177 <div class='jd-details'> 6178 <h4 class='jd-details-title'> 6179 <span class='sympad'>nextafter</span> 6180 <span class='normal'>: Next floating point number</span> 6181 </h4> 6182 <div class='jd-details-descr'> 6183 <table class='jd-tagtable'><tbody> 6184 <tr> 6185 <td>float nextafter(float v, float target); 6186 </td> 6187 <td> </td> 6188 </tr> 6189 <tr> 6190 <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); 6191 </td> 6192 <td> </td> 6193 </tr> 6194 <tr> 6195 <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); 6196 </td> 6197 <td> </td> 6198 </tr> 6199 <tr> 6200 <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); 6201 </td> 6202 <td> </td> 6203 </tr> 6204 </tbody></table> 6205 </div> 6206 <div class='jd-tagdata jd-tagdescr'> 6207 <p> Returns the next representable floating point number from v towards target. 6208 </p> 6209 6210 <p> In rs_fp_relaxed mode, a denormalized input value may not yield the next denormalized 6211 value, as support of denormalized values is optional in relaxed mode. 6212 </p> 6213 </div> 6214 </div> 6215 6216 <a name='android_rs:pow'></a> 6217 <div class='jd-details'> 6218 <h4 class='jd-details-title'> 6219 <span class='sympad'>pow</span> 6220 <span class='normal'>: Base raised to an exponent</span> 6221 </h4> 6222 <div class='jd-details-descr'> 6223 <table class='jd-tagtable'><tbody> 6224 <tr> 6225 <td>float pow(float base, float exponent); 6226 </td> 6227 <td> </td> 6228 </tr> 6229 <tr> 6230 <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); 6231 </td> 6232 <td> </td> 6233 </tr> 6234 <tr> 6235 <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); 6236 </td> 6237 <td> </td> 6238 </tr> 6239 <tr> 6240 <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); 6241 </td> 6242 <td> </td> 6243 </tr> 6244 </tbody></table> 6245 </div> 6246 <div class='jd-tagdata jd-tagdescr'> 6247 <p> Returns base raised to the power exponent, i.e. base ^ exponent. 6248 </p> 6249 6250 <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 6251 base to be non-negative. 6252 </p> 6253 </div> 6254 </div> 6255 6256 <a name='android_rs:pown'></a> 6257 <div class='jd-details'> 6258 <h4 class='jd-details-title'> 6259 <span class='sympad'>pown</span> 6260 <span class='normal'>: Base raised to an integer exponent</span> 6261 </h4> 6262 <div class='jd-details-descr'> 6263 <table class='jd-tagtable'><tbody> 6264 <tr> 6265 <td>float pown(float base, int exponent); 6266 </td> 6267 <td> </td> 6268 </tr> 6269 <tr> 6270 <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); 6271 </td> 6272 <td> </td> 6273 </tr> 6274 <tr> 6275 <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); 6276 </td> 6277 <td> </td> 6278 </tr> 6279 <tr> 6280 <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); 6281 </td> 6282 <td> </td> 6283 </tr> 6284 </tbody></table> 6285 </div> 6286 <div class='jd-tagdata jd-tagdescr'> 6287 <p> Returns base raised to the power exponent, i.e. base ^ exponent. 6288 </p> 6289 6290 <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 6291 base to be non-negative. 6292 </p> 6293 </div> 6294 </div> 6295 6296 <a name='android_rs:powr'></a> 6297 <div class='jd-details'> 6298 <h4 class='jd-details-title'> 6299 <span class='sympad'>powr</span> 6300 <span class='normal'>: Positive base raised to an exponent</span> 6301 </h4> 6302 <div class='jd-details-descr'> 6303 <table class='jd-tagtable'><tbody> 6304 <tr> 6305 <td>float powr(float base, float exponent); 6306 </td> 6307 <td> </td> 6308 </tr> 6309 <tr> 6310 <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); 6311 </td> 6312 <td> </td> 6313 </tr> 6314 <tr> 6315 <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); 6316 </td> 6317 <td> </td> 6318 </tr> 6319 <tr> 6320 <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); 6321 </td> 6322 <td> </td> 6323 </tr> 6324 </tbody></table> 6325 </div> 6326 <div class='jd-tagdata jd-tagdescr'> 6327 <p> Returns base raised to the power exponent, i.e. base ^ exponent. base must be >= 0. 6328 </p> 6329 6330 <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. 6331 <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. 6332 </p> 6333 6334 <p> See also <a href='rs_math.html#android_rs:native_powr'>native_powr</a>(). 6335 </p> 6336 </div> 6337 </div> 6338 6339 <a name='android_rs:radians'></a> 6340 <div class='jd-details'> 6341 <h4 class='jd-details-title'> 6342 <span class='sympad'>radians</span> 6343 <span class='normal'>: Converts degrees into radians</span> 6344 </h4> 6345 <div class='jd-details-descr'> 6346 <table class='jd-tagtable'><tbody> 6347 <tr> 6348 <td>float radians(float v); 6349 </td> 6350 <td> </td> 6351 </tr> 6352 <tr> 6353 <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); 6354 </td> 6355 <td> </td> 6356 </tr> 6357 <tr> 6358 <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); 6359 </td> 6360 <td> </td> 6361 </tr> 6362 <tr> 6363 <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); 6364 </td> 6365 <td> </td> 6366 </tr> 6367 </tbody></table> 6368 </div> 6369 <div class='jd-tagdata jd-tagdescr'> 6370 <p> Converts from degrees to radians. 6371 </p> 6372 </div> 6373 </div> 6374 6375 <a name='android_rs:remainder'></a> 6376 <div class='jd-details'> 6377 <h4 class='jd-details-title'> 6378 <span class='sympad'>remainder</span> 6379 <span class='normal'>: Remainder of a division</span> 6380 </h4> 6381 <div class='jd-details-descr'> 6382 <table class='jd-tagtable'><tbody> 6383 <tr> 6384 <td>float remainder(float numerator, float denominator); 6385 </td> 6386 <td> </td> 6387 </tr> 6388 <tr> 6389 <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); 6390 </td> 6391 <td> </td> 6392 </tr> 6393 <tr> 6394 <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); 6395 </td> 6396 <td> </td> 6397 </tr> 6398 <tr> 6399 <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); 6400 </td> 6401 <td> </td> 6402 </tr> 6403 </tbody></table> 6404 </div> 6405 <div class='jd-tagdata jd-tagdescr'> 6406 <p> Returns the remainder of (numerator / denominator), where the quotient is rounded towards 6407 the nearest integer. 6408 </p> 6409 6410 <p> The function <a href='rs_math.html#android_rs:fmod'>fmod</a>() is similar but rounds toward the closest interger. 6411 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) 6412 while <code>remainder(-3.8f, 2.f)</code> returns 0.2f (-3.8f - -2.f * 2.f). 6413 </p> 6414 </div> 6415 </div> 6416 6417 <a name='android_rs:remquo'></a> 6418 <div class='jd-details'> 6419 <h4 class='jd-details-title'> 6420 <span class='sympad'>remquo</span> 6421 <span class='normal'>: Remainder and quotient of a division</span> 6422 </h4> 6423 <div class='jd-details-descr'> 6424 <table class='jd-tagtable'><tbody> 6425 <tr> 6426 <td>float remquo(float numerator, float denominator, int* quotient); 6427 </td> 6428 <td> </td> 6429 </tr> 6430 <tr> 6431 <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); 6432 </td> 6433 <td> </td> 6434 </tr> 6435 <tr> 6436 <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); 6437 </td> 6438 <td> </td> 6439 </tr> 6440 <tr> 6441 <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); 6442 </td> 6443 <td> </td> 6444 </tr> 6445 </tbody></table> 6446 </div> 6447 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 6448 <table class='jd-tagtable'><tbody> 6449 <tr><th>numerator</th><td>Numerator.</td></tr> 6450 <tr><th>denominator</th><td>Denominator.</td></tr> 6451 <tr><th>quotient</th><td>*quotient will be set to the integer quotient.</td></tr> 6452 </tbody></table> 6453 </div> 6454 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5> 6455 <table class='jd-tagtable'><tbody> 6456 <tr><td>Remainder, precise only for the low three bits.</td></tr> 6457 </tbody></table> 6458 </div> 6459 <div class='jd-tagdata jd-tagdescr'> 6460 <p> Returns the quotient and the remainder of (numerator / denominator). 6461 </p> 6462 6463 <p> Only the sign and lowest three bits of the quotient are guaranteed to be accurate. 6464 </p> 6465 6466 <p> This function is useful for implementing periodic functions. The low three bits of the 6467 quotient gives the quadrant and the remainder the distance within the quadrant. 6468 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> 6469 to reduce very large value of x to something within a limited range. 6470 </p> 6471 6472 <p> Example: <code>remquo(-23.5f, 8.f, &quot)</code> sets the lowest three bits of quot to 3 6473 and the sign negative. It returns 0.5f. 6474 </p> 6475 </div> 6476 </div> 6477 6478 <a name='android_rs:rint'></a> 6479 <div class='jd-details'> 6480 <h4 class='jd-details-title'> 6481 <span class='sympad'>rint</span> 6482 <span class='normal'>: Round to even</span> 6483 </h4> 6484 <div class='jd-details-descr'> 6485 <table class='jd-tagtable'><tbody> 6486 <tr> 6487 <td>float rint(float v); 6488 </td> 6489 <td> </td> 6490 </tr> 6491 <tr> 6492 <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); 6493 </td> 6494 <td> </td> 6495 </tr> 6496 <tr> 6497 <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); 6498 </td> 6499 <td> </td> 6500 </tr> 6501 <tr> 6502 <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); 6503 </td> 6504 <td> </td> 6505 </tr> 6506 </tbody></table> 6507 </div> 6508 <div class='jd-tagdata jd-tagdescr'> 6509 <p> Rounds to the nearest integral value. 6510 </p> 6511 6512 <p> rint() rounds half values to even. For example, <code>rint(0.5f)</code> returns 0.f and 6513 <code>rint(1.5f)</code> returns 2.f. Similarly, <code>rint(-0.5f)</code> returns -0.f and 6514 <code>rint(-1.5f)</code> returns -2.f. 6515 </p> 6516 6517 <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. 6518 </p> 6519 </div> 6520 </div> 6521 6522 <a name='android_rs:rootn'></a> 6523 <div class='jd-details'> 6524 <h4 class='jd-details-title'> 6525 <span class='sympad'>rootn</span> 6526 <span class='normal'>: Nth root</span> 6527 </h4> 6528 <div class='jd-details-descr'> 6529 <table class='jd-tagtable'><tbody> 6530 <tr> 6531 <td>float rootn(float v, int n); 6532 </td> 6533 <td> </td> 6534 </tr> 6535 <tr> 6536 <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); 6537 </td> 6538 <td> </td> 6539 </tr> 6540 <tr> 6541 <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); 6542 </td> 6543 <td> </td> 6544 </tr> 6545 <tr> 6546 <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); 6547 </td> 6548 <td> </td> 6549 </tr> 6550 </tbody></table> 6551 </div> 6552 <div class='jd-tagdata jd-tagdescr'> 6553 <p> Compute the Nth root of a value. 6554 </p> 6555 6556 <p> See also <a href='rs_math.html#android_rs:native_rootn'>native_rootn</a>(). 6557 </p> 6558 </div> 6559 </div> 6560 6561 <a name='android_rs:round'></a> 6562 <div class='jd-details'> 6563 <h4 class='jd-details-title'> 6564 <span class='sympad'>round</span> 6565 <span class='normal'>: Round away from zero</span> 6566 </h4> 6567 <div class='jd-details-descr'> 6568 <table class='jd-tagtable'><tbody> 6569 <tr> 6570 <td>float round(float v); 6571 </td> 6572 <td> </td> 6573 </tr> 6574 <tr> 6575 <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); 6576 </td> 6577 <td> </td> 6578 </tr> 6579 <tr> 6580 <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); 6581 </td> 6582 <td> </td> 6583 </tr> 6584 <tr> 6585 <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); 6586 </td> 6587 <td> </td> 6588 </tr> 6589 </tbody></table> 6590 </div> 6591 <div class='jd-tagdata jd-tagdescr'> 6592 <p> Round to the nearest integral value. 6593 </p> 6594 6595 <p> round() rounds half values away from zero. For example, <code>round(0.5f)</code> returns 1.f 6596 and <code>round(1.5f)</code> returns 2.f. Similarly, <code>round(-0.5f)</code> returns -1.f 6597 and <code>round(-1.5f)</code> returns -2.f. 6598 </p> 6599 6600 <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. 6601 </p> 6602 </div> 6603 </div> 6604 6605 <a name='android_rs:rsClamp'></a> 6606 <div class='jd-details'> 6607 <h4 class='jd-details-title'> 6608 <span class='sympad'>rsClamp</span> 6609 <span class='normal'>: Restrain a value to a range</span> 6610 </h4> 6611 <div class='jd-details-descr'> 6612 <table class='jd-tagtable'><tbody> 6613 <tr> 6614 <td>char rsClamp(char amount, char low, char high); 6615 </td> 6616 <td> </td> 6617 </tr> 6618 <tr> 6619 <td>int rsClamp(int amount, int low, int high); 6620 </td> 6621 <td> </td> 6622 </tr> 6623 <tr> 6624 <td>short rsClamp(short amount, short low, short high); 6625 </td> 6626 <td> </td> 6627 </tr> 6628 <tr> 6629 <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); 6630 </td> 6631 <td> </td> 6632 </tr> 6633 <tr> 6634 <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); 6635 </td> 6636 <td> </td> 6637 </tr> 6638 <tr> 6639 <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); 6640 </td> 6641 <td> </td> 6642 </tr> 6643 </tbody></table> 6644 </div> 6645 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 6646 <table class='jd-tagtable'><tbody> 6647 <tr><th>amount</th><td>Value to clamp.</td></tr> 6648 <tr><th>low</th><td>Lower bound.</td></tr> 6649 <tr><th>high</th><td>Upper bound.</td></tr> 6650 </tbody></table> 6651 </div> 6652 <div class='jd-tagdata jd-tagdescr'> 6653 <p><b>Deprecated.</b> Use <a href='rs_math.html#android_rs:clamp'>clamp</a>() instead.</p> 6654 <p> Clamp a value between low and high. 6655 </p> 6656 </div> 6657 </div> 6658 6659 <a name='android_rs:rsFrac'></a> 6660 <div class='jd-details'> 6661 <h4 class='jd-details-title'> 6662 <span class='sympad'>rsFrac</span> 6663 <span class='normal'>: Returns the fractional part of a float</span> 6664 </h4> 6665 <div class='jd-details-descr'> 6666 <table class='jd-tagtable'><tbody> 6667 <tr> 6668 <td>float rsFrac(float v); 6669 </td> 6670 <td> </td> 6671 </tr> 6672 </tbody></table> 6673 </div> 6674 <div class='jd-tagdata jd-tagdescr'> 6675 <p><b>Deprecated.</b> Use <a href='rs_math.html#android_rs:fract'>fract</a>() instead.</p> 6676 <p> Returns the fractional part of a float 6677 </p> 6678 </div> 6679 </div> 6680 6681 <a name='android_rs:rsRand'></a> 6682 <div class='jd-details'> 6683 <h4 class='jd-details-title'> 6684 <span class='sympad'>rsRand</span> 6685 <span class='normal'>: Pseudo-random number</span> 6686 </h4> 6687 <div class='jd-details-descr'> 6688 <table class='jd-tagtable'><tbody> 6689 <tr> 6690 <td>float rsRand(float max_value); 6691 </td> 6692 <td> </td> 6693 </tr> 6694 <tr> 6695 <td>float rsRand(float min_value, float max_value); 6696 </td> 6697 <td> </td> 6698 </tr> 6699 <tr> 6700 <td>int rsRand(int max_value); 6701 </td> 6702 <td> </td> 6703 </tr> 6704 <tr> 6705 <td>int rsRand(int min_value, int max_value); 6706 </td> 6707 <td> </td> 6708 </tr> 6709 </tbody></table> 6710 </div> 6711 <div class='jd-tagdata jd-tagdescr'> 6712 <p> Return a random value between 0 (or min_value) and max_malue. 6713 </p> 6714 </div> 6715 </div> 6716 6717 <a name='android_rs:rsqrt'></a> 6718 <div class='jd-details'> 6719 <h4 class='jd-details-title'> 6720 <span class='sympad'>rsqrt</span> 6721 <span class='normal'>: Reciprocal of a square root</span> 6722 </h4> 6723 <div class='jd-details-descr'> 6724 <table class='jd-tagtable'><tbody> 6725 <tr> 6726 <td>float rsqrt(float v); 6727 </td> 6728 <td> </td> 6729 </tr> 6730 <tr> 6731 <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); 6732 </td> 6733 <td> </td> 6734 </tr> 6735 <tr> 6736 <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); 6737 </td> 6738 <td> </td> 6739 </tr> 6740 <tr> 6741 <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); 6742 </td> 6743 <td> </td> 6744 </tr> 6745 </tbody></table> 6746 </div> 6747 <div class='jd-tagdata jd-tagdescr'> 6748 <p> Returns (1 / sqrt(v)). 6749 </p> 6750 6751 <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>(). 6752 </p> 6753 </div> 6754 </div> 6755 6756 <a name='android_rs:sign'></a> 6757 <div class='jd-details'> 6758 <h4 class='jd-details-title'> 6759 <span class='sympad'>sign</span> 6760 <span class='normal'>: Sign of a value</span> 6761 </h4> 6762 <div class='jd-details-descr'> 6763 <table class='jd-tagtable'><tbody> 6764 <tr> 6765 <td>float sign(float v); 6766 </td> 6767 <td> </td> 6768 </tr> 6769 <tr> 6770 <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); 6771 </td> 6772 <td> </td> 6773 </tr> 6774 <tr> 6775 <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); 6776 </td> 6777 <td> </td> 6778 </tr> 6779 <tr> 6780 <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); 6781 </td> 6782 <td> </td> 6783 </tr> 6784 </tbody></table> 6785 </div> 6786 <div class='jd-tagdata jd-tagdescr'> 6787 <p> Returns the sign of a value. 6788 </p> 6789 6790 <p> if (v < 0) return -1.f; 6791 else if (v > 0) return 1.f; 6792 else return 0.f; 6793 </p> 6794 </div> 6795 </div> 6796 6797 <a name='android_rs:sin'></a> 6798 <div class='jd-details'> 6799 <h4 class='jd-details-title'> 6800 <span class='sympad'>sin</span> 6801 <span class='normal'>: Sine</span> 6802 </h4> 6803 <div class='jd-details-descr'> 6804 <table class='jd-tagtable'><tbody> 6805 <tr> 6806 <td>float sin(float v); 6807 </td> 6808 <td> </td> 6809 </tr> 6810 <tr> 6811 <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); 6812 </td> 6813 <td> </td> 6814 </tr> 6815 <tr> 6816 <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); 6817 </td> 6818 <td> </td> 6819 </tr> 6820 <tr> 6821 <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); 6822 </td> 6823 <td> </td> 6824 </tr> 6825 </tbody></table> 6826 </div> 6827 <div class='jd-tagdata jd-tagdescr'> 6828 <p> Returns the sine of an angle measured in radians. 6829 </p> 6830 6831 <p> See also <a href='rs_math.html#android_rs:native_sin'>native_sin</a>(). 6832 </p> 6833 </div> 6834 </div> 6835 6836 <a name='android_rs:sincos'></a> 6837 <div class='jd-details'> 6838 <h4 class='jd-details-title'> 6839 <span class='sympad'>sincos</span> 6840 <span class='normal'>: Sine and cosine</span> 6841 </h4> 6842 <div class='jd-details-descr'> 6843 <table class='jd-tagtable'><tbody> 6844 <tr> 6845 <td>float sincos(float v, float* cos); 6846 </td> 6847 <td> </td> 6848 </tr> 6849 <tr> 6850 <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); 6851 </td> 6852 <td> </td> 6853 </tr> 6854 <tr> 6855 <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); 6856 </td> 6857 <td> </td> 6858 </tr> 6859 <tr> 6860 <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); 6861 </td> 6862 <td> </td> 6863 </tr> 6864 </tbody></table> 6865 </div> 6866 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5> 6867 <table class='jd-tagtable'><tbody> 6868 <tr><th>v</th><td>Incoming value in radians.</td></tr> 6869 <tr><th>cos</th><td>*cos will be set to the cosine value.</td></tr> 6870 </tbody></table> 6871 </div> 6872 <div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5> 6873 <table class='jd-tagtable'><tbody> 6874 <tr><td>Sine of v.</td></tr> 6875 </tbody></table> 6876 </div> 6877 <div class='jd-tagdata jd-tagdescr'> 6878 <p> Returns the sine and cosine of a value. 6879 </p> 6880 6881 <p> See also <a href='rs_math.html#android_rs:native_sincos'>native_sincos</a>(). 6882 </p> 6883 </div> 6884 </div> 6885 6886 <a name='android_rs:sinh'></a> 6887 <div class='jd-details'> 6888 <h4 class='jd-details-title'> 6889 <span class='sympad'>sinh</span> 6890 <span class='normal'>: Hyperbolic sine</span> 6891 </h4> 6892 <div class='jd-details-descr'> 6893 <table class='jd-tagtable'><tbody> 6894 <tr> 6895 <td>float sinh(float v); 6896 </td> 6897 <td> </td> 6898 </tr> 6899 <tr> 6900 <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); 6901 </td> 6902 <td> </td> 6903 </tr> 6904 <tr> 6905 <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); 6906 </td> 6907 <td> </td> 6908 </tr> 6909 <tr> 6910 <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); 6911 </td> 6912 <td> </td> 6913 </tr> 6914 </tbody></table> 6915 </div> 6916 <div class='jd-tagdata jd-tagdescr'> 6917 <p> Returns the hyperbolic sine of v, where v is measured in radians. 6918 </p> 6919 6920 <p> See also <a href='rs_math.html#android_rs:native_sinh'>native_sinh</a>(). 6921 </p> 6922 </div> 6923 </div> 6924 6925 <a name='android_rs:sinpi'></a> 6926 <div class='jd-details'> 6927 <h4 class='jd-details-title'> 6928 <span class='sympad'>sinpi</span> 6929 <span class='normal'>: Sine of a number multiplied by pi</span> 6930 </h4> 6931 <div class='jd-details-descr'> 6932 <table class='jd-tagtable'><tbody> 6933 <tr> 6934 <td>float sinpi(float v); 6935 </td> 6936 <td> </td> 6937 </tr> 6938 <tr> 6939 <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); 6940 </td> 6941 <td> </td> 6942 </tr> 6943 <tr> 6944 <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); 6945 </td> 6946 <td> </td> 6947 </tr> 6948 <tr> 6949 <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); 6950 </td> 6951 <td> </td> 6952 </tr> 6953 </tbody></table> 6954 </div> 6955 <div class='jd-tagdata jd-tagdescr'> 6956 <p> Returns the sine of (v * pi), where (v * pi) is measured in radians. 6957 </p> 6958 6959 <p> To get the sine of a value measured in degrees, call <code>sinpi(v / 180.f)</code>. 6960 </p> 6961 6962 <p> See also <a href='rs_math.html#android_rs:native_sinpi'>native_sinpi</a>(). 6963 </p> 6964 </div> 6965 </div> 6966 6967 <a name='android_rs:sqrt'></a> 6968 <div class='jd-details'> 6969 <h4 class='jd-details-title'> 6970 <span class='sympad'>sqrt</span> 6971 <span class='normal'>: Square root</span> 6972 </h4> 6973 <div class='jd-details-descr'> 6974 <table class='jd-tagtable'><tbody> 6975 <tr> 6976 <td>float sqrt(float v); 6977 </td> 6978 <td> </td> 6979 </tr> 6980 <tr> 6981 <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); 6982 </td> 6983 <td> </td> 6984 </tr> 6985 <tr> 6986 <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); 6987 </td> 6988 <td> </td> 6989 </tr> 6990 <tr> 6991 <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); 6992 </td> 6993 <td> </td> 6994 </tr> 6995 </tbody></table> 6996 </div> 6997 <div class='jd-tagdata jd-tagdescr'> 6998 <p> Returns the square root of a value. 6999 </p> 7000 7001 <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>(). 7002 </p> 7003 </div> 7004 </div> 7005 7006 <a name='android_rs:step'></a> 7007 <div class='jd-details'> 7008 <h4 class='jd-details-title'> 7009 <span class='sympad'>step</span> 7010 <span class='normal'>: 0 if less than a value, 0 otherwise</span> 7011 </h4> 7012 <div class='jd-details-descr'> 7013 <table class='jd-tagtable'><tbody> 7014 <tr> 7015 <td>float step(float edge, float v); 7016 </td> 7017 <td> </td> 7018 </tr> 7019 <tr> 7020 <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); 7021 </td> 7022 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 7023 </td> 7024 </tr> 7025 <tr> 7026 <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); 7027 </td> 7028 <td> </td> 7029 </tr> 7030 <tr> 7031 <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); 7032 </td> 7033 <td> </td> 7034 </tr> 7035 <tr> 7036 <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); 7037 </td> 7038 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 7039 </td> 7040 </tr> 7041 <tr> 7042 <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); 7043 </td> 7044 <td> </td> 7045 </tr> 7046 <tr> 7047 <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); 7048 </td> 7049 <td> </td> 7050 </tr> 7051 <tr> 7052 <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); 7053 </td> 7054 <td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 21</a> 7055 </td> 7056 </tr> 7057 <tr> 7058 <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); 7059 </td> 7060 <td> </td> 7061 </tr> 7062 <tr> 7063 <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); 7064 </td> 7065 <td> </td> 7066 </tr> 7067 </tbody></table> 7068 </div> 7069 <div class='jd-tagdata jd-tagdescr'> 7070 <p> Returns 0.f if v < edge, 1.f otherwise. 7071 </p> 7072 7073 <p> This can be useful to create conditional computations without using loops and branching 7074 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> 7075 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>. 7076 </p> 7077 </div> 7078 </div> 7079 7080 <a name='android_rs:tan'></a> 7081 <div class='jd-details'> 7082 <h4 class='jd-details-title'> 7083 <span class='sympad'>tan</span> 7084 <span class='normal'>: Tangent</span> 7085 </h4> 7086 <div class='jd-details-descr'> 7087 <table class='jd-tagtable'><tbody> 7088 <tr> 7089 <td>float tan(float v); 7090 </td> 7091 <td> </td> 7092 </tr> 7093 <tr> 7094 <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); 7095 </td> 7096 <td> </td> 7097 </tr> 7098 <tr> 7099 <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); 7100 </td> 7101 <td> </td> 7102 </tr> 7103 <tr> 7104 <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); 7105 </td> 7106 <td> </td> 7107 </tr> 7108 </tbody></table> 7109 </div> 7110 <div class='jd-tagdata jd-tagdescr'> 7111 <p> Returns the tangent of an angle measured in radians. 7112 </p> 7113 7114 <p> See also <a href='rs_math.html#android_rs:native_tan'>native_tan</a>(). 7115 </p> 7116 </div> 7117 </div> 7118 7119 <a name='android_rs:tanh'></a> 7120 <div class='jd-details'> 7121 <h4 class='jd-details-title'> 7122 <span class='sympad'>tanh</span> 7123 <span class='normal'>: Hyperbolic tangent</span> 7124 </h4> 7125 <div class='jd-details-descr'> 7126 <table class='jd-tagtable'><tbody> 7127 <tr> 7128 <td>float tanh(float v); 7129 </td> 7130 <td> </td> 7131 </tr> 7132 <tr> 7133 <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); 7134 </td> 7135 <td> </td> 7136 </tr> 7137 <tr> 7138 <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); 7139 </td> 7140 <td> </td> 7141 </tr> 7142 <tr> 7143 <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); 7144 </td> 7145 <td> </td> 7146 </tr> 7147 </tbody></table> 7148 </div> 7149 <div class='jd-tagdata jd-tagdescr'> 7150 <p> Returns the hyperbolic tangent of a value. 7151 </p> 7152 7153 <p> See also <a href='rs_math.html#android_rs:native_tanh'>native_tanh</a>(). 7154 </p> 7155 </div> 7156 </div> 7157 7158 <a name='android_rs:tanpi'></a> 7159 <div class='jd-details'> 7160 <h4 class='jd-details-title'> 7161 <span class='sympad'>tanpi</span> 7162 <span class='normal'>: Tangent of a number multiplied by pi</span> 7163 </h4> 7164 <div class='jd-details-descr'> 7165 <table class='jd-tagtable'><tbody> 7166 <tr> 7167 <td>float tanpi(float v); 7168 </td> 7169 <td> </td> 7170 </tr> 7171 <tr> 7172 <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); 7173 </td> 7174 <td> </td> 7175 </tr> 7176 <tr> 7177 <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); 7178 </td> 7179 <td> </td> 7180 </tr> 7181 <tr> 7182 <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); 7183 </td> 7184 <td> </td> 7185 </tr> 7186 </tbody></table> 7187 </div> 7188 <div class='jd-tagdata jd-tagdescr'> 7189 <p> Returns the tangent of (v * pi), where (v * pi) is measured in radians. 7190 </p> 7191 7192 <p> To get the tangent of a value measured in degrees, call <code>tanpi(v / 180.f)</code>. 7193 </p> 7194 7195 <p> See also <a href='rs_math.html#android_rs:native_tanpi'>native_tanpi</a>(). 7196 </p> 7197 </div> 7198 </div> 7199 7200 <a name='android_rs:tgamma'></a> 7201 <div class='jd-details'> 7202 <h4 class='jd-details-title'> 7203 <span class='sympad'>tgamma</span> 7204 <span class='normal'>: Gamma function</span> 7205 </h4> 7206 <div class='jd-details-descr'> 7207 <table class='jd-tagtable'><tbody> 7208 <tr> 7209 <td>float tgamma(float v); 7210 </td> 7211 <td> </td> 7212 </tr> 7213 <tr> 7214 <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); 7215 </td> 7216 <td> </td> 7217 </tr> 7218 <tr> 7219 <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); 7220 </td> 7221 <td> </td> 7222 </tr> 7223 <tr> 7224 <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); 7225 </td> 7226 <td> </td> 7227 </tr> 7228 </tbody></table> 7229 </div> 7230 <div class='jd-tagdata jd-tagdescr'> 7231 <p> Returns the gamma function of a value. 7232 </p> 7233 7234 <p> See also <a href='rs_math.html#android_rs:lgamma'>lgamma</a>(). 7235 </p> 7236 </div> 7237 </div> 7238 7239 <a name='android_rs:trunc'></a> 7240 <div class='jd-details'> 7241 <h4 class='jd-details-title'> 7242 <span class='sympad'>trunc</span> 7243 <span class='normal'>: Truncates a floating point</span> 7244 </h4> 7245 <div class='jd-details-descr'> 7246 <table class='jd-tagtable'><tbody> 7247 <tr> 7248 <td>float trunc(float v); 7249 </td> 7250 <td> </td> 7251 </tr> 7252 <tr> 7253 <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); 7254 </td> 7255 <td> </td> 7256 </tr> 7257 <tr> 7258 <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); 7259 </td> 7260 <td> </td> 7261 </tr> 7262 <tr> 7263 <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); 7264 </td> 7265 <td> </td> 7266 </tr> 7267 </tbody></table> 7268 </div> 7269 <div class='jd-tagdata jd-tagdescr'> 7270 <p> Rounds to integral using truncation. 7271 </p> 7272 7273 <p> For example, <code>trunc(1.7f)</code> returns 1.f and <code>trunc(-1.7f)</code> returns -1.f. 7274 </p> 7275 7276 <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. 7277 </p> 7278 </div> 7279 </div> 7280 7281 </div> 7282