写点什么

krpano 全景之内置函数 ---asyncloop roundval 等(不定期更新)

作者:Java高工P7
  • 2021 年 11 月 10 日
  • 本文字数:1250 字

    阅读完需:约 4 分钟

loopactions


The actions that will be repeatedly called / executed as long as the condition is true.


doneactions (optionally, asyncloop only)


The actions that will be called when the condition becomes false and the looping stops.


2.基本的函数运算(add、sub、mul、div、mod、pow)


==================================


add(variable, valueA, valueB*)


sub(variable, valueA, valueB*)


mul(variable, valueA, valueB*)


div(variable, valueA, valueB*)


mod(variable, valueA, valueB*)


pow(variable, valueA, valueB*)


Actions for mathematical calculations.


These actions can be used with 2 or3parameters:


with 2 parameters:


add(dst,val1)? =? dst = dst +val1 (like +


《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》
浏览器打开:qq.cn.hn/FTe 免费领取
复制代码


=)


sub(dst,val1)? =? dst = dst -val1 (like -=)


mul(dst,val1)? =? dst = dst *val1 (like *=)


div(dst,val1)? =? dst = dst /val1 (like /=)


mod(dst,val1)? =? dst = dst %val1 (modulate)


pow(dst,val1)? =? dst = dst ^ val1


with 3 parameters:


add(dst,val1,val2)? =? dst = val1+ val2


sub(dst,val1,val2)? =? dst = val1- val2


mul(dst,val1,val2)? =? dst = val1* val2


div(dst,val1,val2)? = ?dst = val1 / val2


mod(dst,val1,val2) ?= dst = val1 %val2 (modulate)


pow(dst,val1,val2)? =? dst = val1^ val2


Note - val1 and val2 can be values or variables. When val1 or val2 is a variable then automatically the content of the variable will be used!


//val1 和 val2 是可以为常量或者变量的


Parameters:


variable


The variable where the result of the calculation will be stored**.//生成的结果直接被存储起来。**


When the variable doesn't exists, it will be created.//如果没有定义直接创建一个


valueA / valueB (optionally)


The values or variables for the calculation.


3.roundval




roundval(variable, decimalplaces*)


Rounds the value of the variable to given decimal places (0 when not set).//在小数点后给定指定的数值的位数。如果不设置的话默认为 0


(Note - the variable will be a string internally after rounding) //四舍五入后的内部变量将是一个字符串


Parameters:


variable


The variable to be rounded.


decimalplaces (optionally)


The number of decimal places.


4.txtadd


========


没什么说的,在 destination 位置添加文本,如果多个参数的话就连在一起。


txtadd(destination, txt1, txt2*, txt3*, ...)


The txtadd action can be used to add/connect several texts / values together.


The action can be used with 2 or more parameters. When using only two parameters (destination and a text) then the text will be added to current value of the destination variable.


Parameters:


destination


The destination variable where the connected text will be stored.

用户头像

Java高工P7

关注

还未添加个人签名 2021.11.08 加入

还未添加个人简介

评论

发布
暂无评论
krpano全景之内置函数---asyncloop roundval 等(不定期更新)