1 Star 0 Fork 5K

famoustang / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
graphic_math-h.md 5.09 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

graphic_math.h

Overview

Related Modules:

Graphic

Description:

Defines mathematical operation functions and types, including trigonometric functions, two-dimensional vectors, three-dimensional vectors, and matrices.

Since:

1.0

Version:

1.0

Summary

Data Structures

Data Structure Name

Description

OHOS::Vector2< T >

Defines the two-dimensional vector, and provides basic mathematical operations such as vector assignment, scalar product, cross product, addition, and subtraction.

OHOS::Vector3< T >

Defines the 3-dimensional vector, and provides basic operators such as [] and ==.

OHOS::Matrix3< T >

Defines a 3 x 3 matrix.

Macros

Macro Name and Value

Description

MATH_MAX(a, b)   ((a) > (b) ? (a) : (b))

Larger of a and b.

MATH_MIN(a, b)   ((a) < (b) ? (a) : (b))

Smaller of a and b.

MATH_ABS(x)   ((x) > 0 ? (x) : (-(x)))

Absolute value of x.

MATH_MINUS(a, b)   ((a) < (b) ? ((b) - (a)) : ((a) - (b)))

Difference between a and b.

1
https://gitee.com/famoustang/docs.git
git@gitee.com:famoustang/docs.git
famoustang
docs
docs
master

搜索帮助